Open vitalz opened 7 years ago
I like the idea, but the proposed implementation does not make much sense. Product and Right may have multiple relationships.
A junction table is a database entity, and the most natural solution would be to provide the API to synchronize database entities. Most parts should be already there, e.g.
db:product_id
and db:right_id
)matchById()
(might need some tweaks if it relies on the ObjectId internally)+1 on DbEntity sync. I had a similar idea when we discussed it with @rzen .
@atomashpolskiy : let's discuss offline some time after July 3 (or sooner over video chat if you need to).
Cayenne does not generate (associative) entity classes for many-to-many database tables when junction table just keeps only foreign keys: for instance, product and right has relationship defined by table record {product_id, right_id}. LinkMove has to provide ability to import/remove relationships in a some way like:
Issue is per my talk to @rzen.