Custom filter on an entity's EntityCollections

Posts   
 
    
lundek
User
Posts: 2
Joined: 19-Apr-2007
# Posted on: 19-Apr-2007 13:19:50   

Hi.

I'm evaluating LLBLGen, and I have a question.

My version is 2.0.0.0, and I'm using the SelfServicing template group.

For the project I'm currently working on there is a policy never to delete anything from the database. We just mark objects as inactive/terminated.

In our model there is a PartyEntity and an AddressEntity. Both entities inherit from DataObjectEntity which has a field denoting whether or not the object is terminated.

A PartyEntity can have any number of AddressEntities through a foreign key relationship, so there is a property on PartyEntity called Addresses of the type AddressCollection.

My question is this: Is there any way I can make sure no inactive/terminated addresses are loaded into the collection? I would be nice to solve this once and not let the poor people working on the presentation layer worry about such matters.

That's it. Hope my question isn't too ignorant. I've looked through the documentation and forums, but haven't found quite what I'm looking for simple_smile

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 19-Apr-2007 16:05:56   

I think the following threads might be helpful (the second one in particular): http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=5753 http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=6074

lundek
User
Posts: 2
Joined: 19-Apr-2007
# Posted on: 20-Apr-2007 10:09:55   

That might work, but I'm reluctant to start hacking the query engine. Atleast until I have a better grip on how everything fits together.

Thanks anyway simple_smile