|
I have 3 models:
Person * --- 1 Membership 1 -- * Group
I have mapped all three objects (ie. not using many-many).
Now i'm doing "logical delete" or "soft delete" i've seen it referred to, on the Group model. Is it possible to only fetch the non-deleted Groups by association from the Person object?
Ideally i'd like to have the Person.Memberships collection lazily loaded, but if I load in the Memberships collection, i'd like to eager fetch the groups with a where clause filtering out the deleted groups.
Can this only be achieved by a query?
Thanks,
Dave Newman
|