This is a migrated thread and some comments may be shown as answers.

IsJoinTable with an extra column

2 Answers 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Erik
Top achievements
Rank 2
Erik asked on 25 Sep 2012, 03:30 PM
Hi all,

I've got a join table consisting of 2 ID's. OpenAccess marks this table as a join table. Therefor it's not created as a separate class.
This works perfectly.

Now I'd like to add an extra column to this table. When I update the model the IsJoinTable mark is obviously removed.
My question is, can I somehow combine the extra field and still maintain the join table functionality?

Regards,

Erik

2 Answers, 1 is accepted

Sort by
0
Viktor Zhivkov
Telerik team
answered on 27 Sep 2012, 10:55 AM
Hi Erik,

If you add any additional column to a many-to-many join table it is automatically promoted to entity and a new class is generated and mapped to it. This is necessary in order to give you access to the additional attributes in the table.
Unfortunately this means that you have to do one additional hop when traversing the graph as opposed to the normal many-to-many mapping.
Getting back to you question - no there is no way to combine the join table and the new entity.

If you need assistance implementing navigation between graph of entities connected that way do not hesitate to contact us.

Greetings,
Viktor Zhivkov
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
0
Erik
Top achievements
Rank 2
answered on 05 Oct 2012, 08:30 AM
Makes sense.
It's against the definition of join tables in the first place.
Tags
General Discussions
Asked by
Erik
Top achievements
Rank 2
Answers by
Viktor Zhivkov
Telerik team
Erik
Top achievements
Rank 2
Share this question
or