typedlist contains collection of typedlist

Posts   
 
    
bunzee
User
Posts: 84
Joined: 20-Mar-2007
# Posted on: 28-Jul-2009 01:43:49   

llblgen 2.6 dotnet 3.5

I have the following tables

bill m:1 claim bill m:1 provider bill 1:n bill_line

I want to create a bill typed list that also has claim.claimnumber and provider.name and there's no problem in getting this. In the same typed list I also want to have a collection of bill_line typedlist (much like a claimentity contains a collection of bill_lineentity). Does any one know how I can do this?

Thanks

BZ

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 28-Jul-2009 04:59:38   

BZ,

Could you tell what it's important to use typedlist here, because as I see, the EntityCollection and Fields on Related Fields fits better here.

Anyway, If it would be necessary, I would create two typedList in LLBLGen Designer, one for Bill and one for BillLine. Then at BillTypedList, at Custom Code, create a variable and custom property that store a BillLineTypeList. Then you outside the typedlist fill the BillTypedList and its BillLineTypedList property.

Are you using Adapter or SelfServicing?

David Elizondo | LLBLGen Support Team
bunzee
User
Posts: 84
Joined: 20-Mar-2007
# Posted on: 28-Jul-2009 05:04:43   

Well, I use BillEntity for other read/write. In this fetch I need lots of other fields from the related entities (which I don't need all of them in other cases) and I don't want the BillEntity to be flooded with these related fields.

I am using adapter model.

Thanks.

BZ

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 28-Jul-2009 10:35:31   

I second Daelmo's suggestion for using Entities and relations to implement what you want to do.

You can even create 2 SQL views, and map them to entities and use the designer to define the relation between them.