This project is read-only.


self-referencing m2m relations in m2m4ria v2


Is it possible to use self referencing m2m relations in m2m4ria v2 (using the LinkTables)?

When trying to use ToLinkTable<MyEntity, MyEntity, MyEntityLink> you get an error saying that it is is impossible to distinguish between the two different extension functions since they are both identical since TObject1 = TObject2.

Maybe an additional ToLinkTable or ToLinkTableSelfReferencing with just <TObject and TLinkTable> as generic parameters could solve the issue

For the time being we will continue to use the v1 versions as it handles self referencing m2m relations without fuss since commit d278450fdd3c
Closed Feb 26, 2014 at 7:54 PM by MdeJ


MdeJ wrote Apr 15, 2013 at 1:28 PM

I've added support for self-referencing m2m relations. I've created and uploaded new nuget packages as well.

Although a self-referencing m2m relation could do with a single link table view, in the current implementation there are two views need.

Please let me know if it works for you.