Many to Many relationships?

Posts   
 
    
JasonCoder
User
Posts: 4
Joined: 12-Jun-2007
# Posted on: 27-Sep-2007 20:04:04   

ver: 2.0.0.0 final

Hello,

I was surprised I couldn't find something related in the forums but several searches came up with zero results. In fact, simply searching on the term "many" gives zero results. Odd.

Anyways, my question is one of dealing with many to many (M:N) relationships in the code. After adding some M:N relationships in the designer and generating the code I don't see these relationships in the xxxEntity.Relationships collection. What am I doing wrong? I'm using the self-servicing templates.

And just so I have this right, in order to use a M:N relationship llblgenpro wants to generate an entity for the intermediate table, yes? Even though this entity will not be used ever (at least not by the consuming code).

Thanks in advance,

Jason

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 28-Sep-2007 11:02:34   

I was surprised I couldn't find something related in the forums but several searches came up with zero results. In fact, simply searching on the term "many" gives zero results. Odd.

SQL Server's Full-Text Search consider "many" as one of those noise words.(ignores it) For a list of all those noise words, check the nosie files under <Microsoft SQL Server Installation Folder>\MSSQL.1\MSSQL\FTData

Anyways, my question is one of dealing with many to many (M:N) relationships in the code. After adding some M:N relationships in the designer and generating the code I don't see these relationships in the xxxEntity.Relationships collection. What am I doing wrong? I'm using the self-servicing templates.

selfservicing requires relations to be present at both sides, did you mark the checkBox "Also add this relation to the related entity" found on the "Custom m:n entity relation editor" window.

And just so I have this right, in order to use a M:N relationship llblgenpro wants to generate an entity for the intermediate table, yes? Even though this entity will not be used ever (at least not by the consuming code).

LLBLGen Pro doesn't generate an intermediate table/entity, but in order for you to create a custom m:n relation, you'd have to use a couple of 1:n and m:1 relations present in your project.