File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

migrating code from hibernate 2 to hibernate 3.0

 
Sunitha Jampala
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to migrate code from hibernate 2 to hibernate 3.0 and our application is using many session.find(String query, String[] values, NulllableType[] types)

I want avoid writing too may session.createQuery ( query) as the queries are many

what is equivalent query method in hibernate 3

thanks
sunitha
 
Francois Nadeau
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sunitha,

According to the Hibernate migration guide find() has been replaced by createQuery().

I suppose you could wrap your session instances within a customized class with a find function which uses createQuery, but it may be better (from a standard point of view) to simply bite the bullet and rewrite all of the queries.

Hope this helps.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic