safrazik / breeze.server.php

Breeze JS support for PHP applications
MIT License
29 stars 11 forks source link

Many TO Many #11

Closed davidsielert closed 9 years ago

davidsielert commented 9 years ago

Should probably be documented that many to many doesn't work

safrazik commented 9 years ago

Since the Breeze JS library itself doesn't support many to many (yet), we didn't give any emphasis on that. And it's considered a good practice to create a new entity for many to many associations

http://doctrine-orm.readthedocs.org/en/latest/reference/association-mapping.html#many-to-many-unidirectional

Why are many-to-many associations less common? Because frequently you want to associate additional attributes with an association, in which case you introduce an association class. Consequently, the direct many-to-many association disappears and is replaced by one-to-many/many-to-one associations between the 3 participating classes.

davidsielert commented 9 years ago

understood just took a bit of digging more into breeze to figure this out..