m:1 relation typed list

Posts   
 
    
shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 04-Jul-2013 13:00:48   

LLBLGEN 4.0 .NET Framework 4.0 VB.NET Windows Application LLBLGEN Runtime framework SQL Server 2008

Hi,

Example: I have the following 2 tables Table : Member Fileds: TitleID, Name, SpouseTitleID, Spouse Name

Table: Title TitleID Description

FK is set as follows Member.TitleID=Title.TitleID Member.SpouseTitleID=Title.TitleID

Now I create one typed list with the above two tables. From Title, I should actually get 2 descriptions because of the join. But the typed list returns only one description from title. How do i resolve this

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-Jul-2013 20:00:42   

Did you add the Title entity twice to the TypedList?

shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 05-Jul-2013 07:20:38   

Walaa wrote:

Did you add the Title entity twice to the TypedList?

No. Do I have to add twice ?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 05-Jul-2013 10:59:58   

Yes as the Member entity joins to the Title entity twice. Make sure to select which relation each one of them is using.

shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 05-Jul-2013 13:29:23   

Walaa wrote:

Yes as the Member entity joins to the Title entity twice. Make sure to select which relation each one of them is using.

Make sure to select which relation each one of them is using

Make sure in designer right ?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 06-Jul-2013 08:55:48   

shekar wrote:

Make sure in designer right ?

Yes, in LLBLGen Designer, where you design your TypedList.

David Elizondo | LLBLGen Support Team