Good morning,
Is there a way, in a many-to-many relationship, to do some filtering on the mapping table
without having that mapping table mapped in the object model?
E.g. three tables:
Code:
User *-- UserGroup --* Group
All I care about in my object model is User and Group with an elegant many-to-many relation, and I certainly don't want to see any UserGroup stuff, but I must still filter some records in the UserGroup table (there's a column "status" in it and it must be set to "enabled").
I've tried to search Google and the forum on terms like 'filter', 'subselect', 'filter mapping', but in Hibernate those seem to bear a different meaning that what I'm looking for.
Any suggestion would be welcome
Cheers