1

I have a junction table with and idenity primary key columns to realize a many to many relationship. Visual Studio automatically detects it as a many to many relationship and the junction table is not an entity.

How can i realize it that also this table is generated as an entity? I need this for breeze.js .

daniel
  • 34,281
  • 39
  • 104
  • 158
  • http://stackoverflow.com/q/6028375/1341477 – Dave Williams Jun 21 '13 at 16:05
  • Ooh, sorry I just reliased you actually want that entity... not sure you can stop the designer doing that by itself but you have two options I know of 1. Manually edit the edmx file 2. Add additional column e.g Id to the table. – Dave Williams Jun 21 '13 at 16:11

1 Answers1

3

You just need to add additional columns (or properties) to that table (or model).

You said that your table has acolumn named ID and it's the primary key withe IsIdentity set to true. It must works, I'm using this approach...

There must be a problem or missing with your table definition. However, if all are OK, just add a nullable column in your table and update your model from database. The problem will go away.

Amin Saqi
  • 18,549
  • 7
  • 50
  • 70