This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Object Relational Mapping and the fly likes Hibernate many-to-many ...with DetachedCriteria/ Criteria Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate many-to-many ...with DetachedCriteria/ Criteria" Watch "Hibernate many-to-many ...with DetachedCriteria/ Criteria" New topic
Author

Hibernate many-to-many ...with DetachedCriteria/ Criteria

Jeevan Sunkersett
Ranch Hand

Joined: Jul 03, 2007
Posts: 77
Hi,

In our project we have a many-to-many relationship between 2 tables, so looked up many webpages explaning the how-to etc.

but none of the examples I found, used DetachedCriteria/ Criteria....all explained the nuances using HQL

In our project, the user is shown a search screen, with many fields (name, from-date, to-date and so on) and so we are using DetachedCriteria

but the hibernate generated query cannot be executed ...getting a ORA:00942 (table or view does not exist).

Could there be issue between detachedCriteria and its hibernate generated sql and Many-to-Many table mappings?

Any example that explains fetching data of many-to-many mapped tables and using hibernate criteria ?

~g1
 
wood burning stoves
 
subject: Hibernate many-to-many ...with DetachedCriteria/ Criteria