Dec/05
23
“Hibernate – A Developers Notebook” – migrating to Hibernate 3.0, Chapter 8
No comments · Posted by Administrator in Java
Chapter 8 introduces Criteria Queries. Only QueryTest.java is affected. Besides the usual net.sf.hibernate to org.hibernate package import renaming, net.sf.hibernate.expressions in Hibernate 2 is replaced by org.hibernate.criterion.
Moreover, change the line
JAVA:
-
-
Example example = Example.create(new Artist(namePattern, null, null));
-
to
JAVA:
-
-
Artist artist = new Artist();
-
artist.setName(namePattern);
-
Example example = Example.create(artist);
-
because Hibernate 3 has generated no argument constructors only.
