File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Lazy loading issue with composite primary keys