Search code examples
sqlsubsonicmany-to-many

Many to Many relationships in Subsonic 3


I can't get this to work with Subsonic 3

I have two tables "Blog" & "Category" with a mapping (joining) table with a composite primary key on both Primary Keys.

I have looked into SQLServer.ttinclude and to my understanding, it doesnt handle many-to-many in the first place!


Solution

  • Relationship properties will get created by the SubSonic template, but they will be from your Blog & Category tables to the joining table (rather than through to each other).

    In one project, I made significant changes to the Classes & Context tt files in order to generate relationship properties across many-to-many tables.