M:N Relation

Posts   
 
    
Maciek
User
Posts: 23
Joined: 28-Aug-2008
# Posted on: 23-Dec-2008 14:25:23   

Hi,

I've got the following problem with M:N relation:

Table A: [ChildID, ParentID]

Table B: [ID, Data]

References:

A.ChildID->B.ID A.ParentID->B.ID

Now. Designer connects B to A (twice) in 1:N relation, but it failes to see M:N between B and B. Any way to fix that?

Thanks in advance.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 23-Dec-2008 15:07:50   

Which version of the Designer is this?

Maciek
User
Posts: 23
Joined: 28-Aug-2008
# Posted on: 23-Dec-2008 15:35:22   

Walaa wrote:

Which version of the Designer is this?

Version: 2.6 Final Released: October 6th, 2008

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 23-Dec-2008 15:51:16   

An M:N relation with self isn't supported, as that will potentially give a lot of (unwanted) m:n relations and it's also not efficient as you can use 2 tables while the generated code will use 3 (start, intermediate and end and start and end are the same entity. )

You can of course add the entity twice and use that, though I'd simply use a fetch in a separate collection instead, as the m:n collection is readonly anyway.

ref:[http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=8226](http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=8226)