You can set the connection table as an object, but it is not general / necessary:
- You will start with this:

- Remove many-to-many relationships between
Product and Order objects - Create a new
ProductOrder object in the designer (either using the toolbar or the context menu) - Define two properties in your new entity that correspond to the foreign keys defined in your join table -
ProductId , OrderId - make sure that both of them are marked as an entity key (they must be a compound primary key in the database) and have the same type as PKs - Open map information and map the new entity to the connection table.

- Create two new one-to-many associations. Frist between
Product and ProductOrder , and the second between Order and ProductOrder . - In the properties window of each added relationship, reference restrictions are set ( as described here) .

There is a very high probability that if you need it, you are doing something wrong.
Ladislav Mrnka
source share