adding fields to the typedList generated code

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 04-Dec-2007 14:17:03   

version 1.0.2005.1 final (self-servicing) VS2005 asp.net 2.0


hiya,

I'm creating a typedList to bind to a grid. I'm trying to add fields to a typedList but think I have run into issues because of my database design.

tblDog dogId (pk) ownerId (fk) --> tblBreederOwner.personId breederId (fk) --> tblBreederOwner.personId

my issue: breeder and owner are stored in the SAME table.

tblBreederOwner personId personName

So, can I get the typedList designer to be aware of this?Or do I manually have to write code so that the grid displays the correct "personName" for a dog's "owner" and "breeder"?

Many thanks,

yogi

goose avatar
goose
User
Posts: 392
Joined: 06-Aug-2007
# Posted on: 04-Dec-2007 16:55:01   

LLBLGen creates two relations for mtblDog - tblBreederOwner. When you design your TypedList at LLBLGen Designer you have to add tblBreederOwner twice to the typelist. That would create two relations at the panel "Relations used" in your typelist designer. So for each one select the correct alternative and the desire Join Hint.

yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 04-Dec-2007 17:57:48   

hiya Goose.

Thanks for that.I thought that I'd have to have done it in code becuase of the way I had it set up.

In the meantime I've got another hassle :-0

yogi