• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help required on hibernate QBE  RSS feed

dipak mehta
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a Set of DetailsObject in MasterObject.

MasterObject maps to a "Master" table and DetailsObject maps to a "Details" table which have Master.ID as foreign key.

Now I want to query whether MasterObject exist in database or not. But it should compare all the DetailsObject from the Set also in the detail table.

I tried like this...

List list = session.createCriteria(MasterObject.class)

this actually queries only for masterObject and didn't compare the DetailsObject which is there as a Set (Collection) ???

is there any way so that all the objects of DetailsObject from Set also gets compared ???
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!