It doesn't generate xxxxFieldIndex:int

Posts   
 
    
robert
User
Posts: 4
Joined: 12-Mar-2004
# Posted on: 16-Mar-2004 16:25:21   

I create a type list name UserLogin. After I join four tables together and I pick ten column out of sixty column from four table I expect LLBLGEN to generate those ten columns for me in ConstantsEnums.cs under UserLoginFieldIndex:int but it doesn't generate the code

Please help.

Thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 16-Mar-2004 16:56:46   

Typed lists are build from entity fields. So, if you have for example a typed list from customer and order, and you want to filter on the ContactTitle field from customer, you can use the CustomerFieldIndex.ContactTitle index.

See the section Using the typed list and typed view classes - Instantiating and using a typed list in the documentation (it's located in the Using the generated code - SelfServicing and Adapter sections).

simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Sam avatar
Sam
User
Posts: 95
Joined: 30-Jun-2004
# Posted on: 05-Nov-2005 00:39:09   

Edit: Oh I see you are talking about TypedLists....Nevermind I found the answer.

What if you join the same entity more than once in your view? Say you have a CustomerTypedView that is created by joing a StringMapEntity multiple times to different fields of the CutomerEnity.

Ex: Say your view looks like this:


Select *
From SalesEntityBase as se
left join ObjectTypeCodes as otc
            on se.ObjectTypeId = otc.ObjectTypeCode
left join StringMap as state
            on se.StateCode = state.AttributeValue
            and se.ObjectTypeId = state.ObjectTypeCode
            and state.AttributeName = 'statecode'
left join StringMap as status
            on se.StatusCode = status.AttributeValue
            and se.ObjectTypeId = status.ObjectTypeCode
            and status.AttributeName = 'statuscode'

Now say you wanted to filter on state and status (by name, I know it would be easier to do it by the key but I am curious on how you would do this).