aspose 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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Lazy loading issue with composite primary keys