This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
[Posted on behalf of a customer] I was able to create the through association and choose the through entity. However I would like to somehow set it up as an auto-through entity, but I cannot work out how to do that. In the docs it says: |
|
|
We show the "convert to auto through entity" command only if: |
|
|
Yes, that is exactly the case. The only values in the join table are the foreign keys, and as such they are also the primary keys. The table is a pure join table, so there is zero value at all in having the entities mapped (and needing the corresponding one-to-many associations to the through entity at all). Can I request that support for a pure through entity be made available if you are using a pure join table? That is how it is supported in all the other ORM's I have been working with, and conceptually adding an extra ID value to the tables complicates and muddies the concept. If the foreign keys used in the join table are not considered part of the primary key, you then need to add other constraints on the table to ensure that you cannot ever have a duplicate entry, since that would be meaningless in a many-to-many association. Not to mention it just adds more data to the resulting tables making the storage requiments bigger. I have it working for the moment, but it just seems ugly to me to either a) have the entity mapped when it is not necessary or b) have a separate id column for that table. |
|