File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
Object Relational Mapping
migrating code from hibernate 2 to hibernate 3.0
Joined: Jul 21, 2009
Jul 21, 2009 15:50:13
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
Joined: Apr 09, 2009
Jul 22, 2009 01:10:44
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.
It is sorta covered in the
JavaRanch Style Guide
subject: migrating code from hibernate 2 to hibernate 3.0
Querying tables with a one-to-many foreign key relationship
Hibernate - Query Issues With Many-To-One Relationships
Unexpected Token Problem
HQL join returns no results.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015