kopf.lastig | Alles mögliche zu Themen wie Familie, Beruf, Medien etc. …

Dec/05

23

“Hibernate – A Developers Notebook” – migrating to Hibernate 3.0, Chapter 8

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:
  1.  
  2. Example example = Example.create(new Artist(namePattern, null, null));
  3.  

to

JAVA:
  1.  
  2. Artist artist = new Artist();
  3. artist.setName(namePattern);
  4. Example example = Example.create(artist);
  5.  

because Hibernate 3 has generated no argument constructors only.

Im Web 2.0 mit anderen teilen:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • DZone
  • email
  • FriendFeed
  • MisterWong.DE
  • MySpace
  • PDF
  • Reddit
  • RSS
  • Tumblr
  • Twitter

· ·

No comments yet.

Leave a Reply

<<

>>

Theme Design by devolux.nh2.me