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
- Example example = Example.create(new Artist(namePattern, null, null));
to
- Artist artist = new Artist();
- artist.setName(namePattern);
- Example example = Example.create(artist);
because Hibernate 3 has generated no argument constructors only.