This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Lazy loading issue with composite primary keys Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Lazy loading issue with composite primary keys" Watch "Lazy loading issue with composite primary keys" New topic
Author

Lazy loading issue with composite primary keys

Shimit Soumithran
Greenhorn

Joined: Dec 07, 2009
Posts: 1
Hello,

I have two entities Enterprise and EnterpriseGroupDefault. Enterprise is the parent entity. EnterpriseGroupDefault has composite primary keys. Its mapping is given below:

Now when I execute session.createQuery("from Enterprise") HQL, it executes successfully but it also fetches the child entity(EnterpriseGroupDefault), which I do not want to happen. Can anyone suggest what is going wrong here?

Thanks
Shimit
 
Have you checked out Aspose?
 
subject: Lazy loading issue with composite primary keys
 
It's not a secret anymore!