Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Lazy loading issue with composite primary keys

Shimit Soumithran
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic