Entity extraction/instantiation condition

Posts   
 
    
idsn11
User
Posts: 39
Joined: 06-May-2008
# Posted on: 25-Jan-2011 15:08:36   

Hi all! I need help.

Some my entity tables has a structure like ths:

ID - uniqueidentifier not null primary key, <some field1> <some field2> ... <some fieldN> RecordStatus int not null default(0).

RecordStatus is of two possible values: 0 - active, 1 - removed.

I need realize (db) extraction condition [RecordStatus = 0]. I.e. instantiate only active entities (related entities too).

Environment: LLBLGen 2.6 Pro, C#/.Net 3.5, MSSQL 2005

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 25-Jan-2011 17:41:39   

Hi

You need to explore the use of Filtering to get the entities that you want, and PreFetch Paths to get their related entities

Matt

idsn11
User
Posts: 39
Joined: 06-May-2008
# Posted on: 26-Jan-2011 07:29:39   

It seems I described the situation incompletely.

I know how I can get the result using API.

But I want to get such behaviour in generated code. I need advice - how to get this by designer or using template engine.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 26-Jan-2011 08:52:20   
idsn11
User
Posts: 39
Joined: 06-May-2008
# Posted on: 26-Jan-2011 11:48:39   

Understood. Thanks.