Skip to content

Loading…

DDC-1002: bug in generate entities with many2many relationships from xml/yml shcemes #1587

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user stfalcon:

I try use many2many relations in my symfony2 learning project https://github.com/symfony/symfony.git
But entities thar generates from yml schemes did not meet entities from doctrine2 guide or entities from beberlei Whitewashing project https://github.com/beberlei/Whitewashing/tree/master/Blog

After that I try generate similar entitries is doctrine2-sandbox. Problem is the same
I attached yml schemes and result entities.

Problem:

  • Entities\Address does not have relations with Entities\User
  • In Entities\User property $adresses instance of Entity\Address. But this Doctrine\Common\Collections\ArrayCollection or no?``` /****
    • @var Entity\Address */ private $addresses;```
  • In Entities\User not at **constructor() method:
    public function **construct()
    {
        $this->addresses = new ArrayCollection();
    }```
@doctrinebot

Comment created by @beberlei:

Fixed the msising constructor. However mind that in my Whitewashing project i wrote the entities manually, not generated them!

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.2 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.