Hi,
I have a many-to-many association between 2 objects in which they are linked by a link table.
My question is how do I filter the set of associated object B objects based on some criteria?
In SQL terms, I need to have the associated set filtered like this:
Select * from table_B, link_table where table_B.id = link_table.id1 AND link_table.id1 = ${someValue} AND tableB.type='SomeFilter'
Right now my set is unfiltered and ends up retrieving all associated objects...
Of course I can cheat and do some filtering in the getter but that's hardly the elegant solution im looking for.
Thanks,
-Yves-
|