My topic is pretty much Doctrine relatetd. But since it will be a big part of ZF 2.0 I hope someone can help me here.
I have a main entity "Contact". This contact belongs to multiple "Categories". The Categories have several options which are options and labels of a select in my contact form. These are my tables: contacts - id - name - categories contacts_categories - id - name contacts_categories_options - id - category_id - label contacts_categories_values - id - contact_id - category_id - option_id How do I map this in doctrine? Do I need self-reference on "contacts_categories_values" on a category in "contacts_categories"? Afterwards, do I get single objects when I call $contact->getCategories() only including id, name from the parent table or do I have to call $contact->getCategories and the getCategory on each object? Thanks in advance! http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html 5. Association Mapping — Doctrine 2 ORM v2.0.0 documentation -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Deep-Association-Mapping-in-Doctrine-tp3465770p3465770.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
