[Solved] Link entity in many-to-many association not generated

0 votes
asked Nov 15, 2013 in Solved by Ian Stamp (190 points)
recategorized Jan 9, 2014 by Martin Freki Stradej

I have two entities, Property and SecurityFeature, which have a many-to-many association. ORM shows a link table PropertySecurityFeature in the designer, but doesn't generate a PropertySecurityFeature.php entity file.

1 Answer

0 votes
answered Dec 19, 2013 by Martin Freki Stradej Skipper developer (74,840 points)
selected Jul 30, 2014 by Martin Freki Stradej
 
Best answer

This behavior is common in Doctrine2. Doctrine2 considers many-to-many assotiation as abstract relation and does not create the MN entity as other frameworks do. Therefore, the MN entity in the visual model is only virtual, and serves only as a representation of the convence. The entity itself will not be exported.

If you need to add more fields to the MN entity, you will need to simulate it in the ORM Designer as two associations and create the MN entity manually.

If you use some other ORM framework, please, let me know which one.

...