Hi everybody..
I am using hibernate and oracle db.
I have a table “A” and a table “B”, with a many-to-many association.
I have to retrieve from DB informations about objects from table “A” and the related objects from table “B”, ecluding those objects from table “A” which don’t have associated any element of “B”.
Currently I query for objects in table “A”, then for any element retrieved I read the collection of associated “B” objects.
Maybe it’s a trivial question, but how can I exclude from the result set those elements of table “A” for which the collection of “B” elements is empty?
Thanks in advance for your help.