posted 18 years ago
Hi,
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)
.add(Example.create(masterObject))
.list();
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 ???