Hi all,
I am using hibernate search 1.1. I want to apply ResultTransformer operation post query to match the targeted data structure.
But i cannot be able to find that class(StaticAliasToBeanResultTransformer) in the hibernate search jar. Where can i find this class?.
Thanks,
...
Hi
I'm recieving the following error when trying to do inserts:
java.lang.NoSuchMethodError : org.hibernate.event.PreInsertEvent.getSource()Lorg/hibernate/event/EventSource;
I've seen other people with the same problem due to incompatibility in hibernate jars, but I believe I've got it right (according to the compatibility matrix)...
Hi
I'm relatively new to Java & maven, and so to get to know my way around, I decided to do a project as a means for learning.
I picked a pretty common stack :
Java 1.6
Hibernate (with annotations)
Spring (with annotations)
JUnit 4
Tomcat
Oracle XE / In-mem hsqldb
By far one of the biggest problems I've experienced is getting the ...
Is it possible to configure Hibernate to use a javax.sql.DataSource instance?
My application already has an instance of javax.sql.DataSource and I'd rather not re-configure the database url, user, password, driver etc just for hibernate.
...
I have a rather large project involving spring and hibernate. Right now, I'm backing certain objects out of hibernate and into memory, and I've hit a sort of snag. I have the following setup.
Class A contains a number of primitives and a class B. B contains primitives and a class C, which was previously lazy-loaded.
Now I have this
...
when i run, i get
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Index: 0, Size: 0
just like error faced by many other users at
http://www.mail-archive.com/[email protected]/msg50006.html
anyone what caused the error?
...
Trying to delete an unmapped class/record via the NHibernate sql api.
But can't seem to get it working. Does anything look wrong with this?
session = NHibernateHelper.GetCurrentSession();
tx = session.BeginTransaction();
using (tx)
{
session.CreateSQLQuery("DELETE FROM tb_category WHERE parentID = :p...
hi i have a table called CHECKPRODUCT.
i also has 2nd table called CHECKSTATUS_LOOKUP with column name DESCRIPTION
while i am getting values from CHECKPRODUCT, i also want value from DESCRIPTION column of 2nd table(CHECKSTATUS_LOOKUP) but i dont want ot join both tables. is there any ways to do that
...
I have this code:
run big query: Select all unprocessed objects from table A
for each result
create or update an output object in table B
update input object: Set it to "processed"
I'd like to have a transaction over the loop body, that is after one row of input is processed, the updated objects should be committed, so when th...
Hi,
I have a following class:
MyClass
public virtual int Id { get; set; }
public virtual int Code { get; set; }
public virtual int Description { get; set; }
public virtual int Name { get; set; }
with the following mapping:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="TestAp...
If I have an instance of a persistence object, and I set some members in like so:
MyThing thing = session.get(MyThing.class, id);
thing.setSomething(thing.getSomething());
session.update(thing);
Will this actually cause hibernate to issue an SQL update command to refresh the record? Or is hibernate smart enough to know that the objec...
Can some explain to me what is the advantage of using detached objects within the context of a web application? AFAIK they are only useful if the objects somehow outlive the "lexical" scope of the transaction, but typically in a web app when your transaction is over you just send your objects to the view layer, and they will not be reatt...
I have Hibernate working and would like to try adding Envers audit/revision functionality but can't seem to figure out what is required. (my example compiles and runs OK and I get the regular Hibernate functionality but no audit tables appear in my database.) Has someone out there done this before? Does it work with H2 database using HSQ...
Hi,
hibernateSession.createQuery("select foo where id = 1");
// This command return the Item with id 1.
// [BREAK POINT STOP] ==> I go in MySQL and I delete this item manualy.
// [BREAK POINT CONTINU]
hibernateSession.createQuery("select foo where id = 1");
// This command return the Item with id 1 too ! :-(
It's the same with hibern...
I have a database table consisting of countries. In my DAO which extends HibernateDAOSupport the following method...
public List<Country> getCountries() {
return getHibernateTemplate().loadAll(Country.class);
}
...generates the following activity:
Hibernate: update countries set name=?, iso_alpha_2=?, iso_alpha_3=? where id=?
Hiber...
I'm currently experimenting with EJB3 as a prestudy for a major project at work. One of the things I'm looking into is query caching.
I've made a very simple domain model with JPA annotations, a @Local business interface and a @Stateless implementation in an EJB-JAR, deployed in an EAR together with a very simple webapp to do some basi...
Hi All,
I implemented getEntityName method in my interceptor. I was expecting that the method will be called by Hibernate to resolve entity name of a (transient) object when I save the object. However, the method getEntityName from the interceptor was not used in the following scenarios:
1) session.saveOrUpdate was called with some en...
Hello, I'm sorry this is a little bit of a bad question since my problem is that I just don't understand which approach to take for this. I've got this hibernate database that works great and I want to use jasper reports to create reports based on the data from it. I have iReport working and connecting to the hibernate configuration an...
I now have my jasper reports working from my JRBeancollectionDataSource in my code! I am just a bit confused about some things...
When I am designing reports in iReport, I create the fields from a query, which I can do fine and all, since when I am actually running the query I'm using a a code JRBeanCollectionDataSource and so is the h...
Anyone knows how to do hibernate mapping for table or view without a primary key?
thanks.
...