You will have to use the second form if you remove the reference I've marked as deprecated... Anyway, I still think it is worth to do so because you get a cleaner model...
I didn't validate the schema I wrote, so please check it carefully and pass it to the Doctrine2 CLI tools... If you need specific support for Doctrine or wish to continue talking about it, I would suggest you to use the correct mailing list, where you can get support by D2 authors ;) Marco Pivetta @Ocramius <http://twitter.com/Ocramius> http://marco-pivetta.com On 21 April 2011 16:07, tridem-zend <[email protected]> wrote: > Wow Marco, > thanks for this amazing answer. I will have the chance to try your code > after easter! > > One question in advance: > Will I be able to use a self-refering category like > > > $contact = ....; > foreach ($contact->getCategories() as $category) { > echo $category->getId(); > echo $category->getName(); > } > > > or do I have to call > > > $contact = ....; > foreach ($contact->getCategories() as $category) { > echo $category->getCategory()->getName(); > echo $category->getCategory()->getId(); > } > > > ?! > > -- > View this message in context: > http://zend-framework-community.634137.n4.nabble.com/Deep-Association-Mapping-in-Doctrine-tp3465770p3465997.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > -- > List: [email protected] > Info: http://framework.zend.com/archives > Unsubscribe: [email protected] > > >
