stephpy / timeline-bundle

Symfony2 bundle to make timeline
192 stars 57 forks source link

Mapping errors in the entity ActionComponent and Timeline in doc and demo app #143

Closed Booklab closed 10 years ago

Booklab commented 10 years ago

Hi Stéphane,

You have two mappings errors in the doc and demo app in entities ActionComponent and Timeline at this lines:

\\Acme\TimelineBundle\Entity\ActionComponent
    /**
     * @ORM\ManyToOne(targetEntity="Action", inversedBy="actionComponents")
     * @ORM\JoinColumn(name="action_id", referencedColumnName="id", onDelete="CASCADE")
     */
    protected $action;

You forgot

inversedBy="actionComponents".
Same in entity Timeline

\\Acme\TimelineBundle\Entity\Timeline
    /**
     * @ORM\ManyToOne(targetEntity="Action", inversedBy="timelines")
     * @ORM\JoinColumn(name="action_id", referencedColumnName="id")
     */
    protected $action;

You forgot

inversedBy="timelines"

It works fine without but you have silent mappings errors in symfony profiler.

Best regards, JM

cordoval commented 10 years ago

I will correct these in my PR, thanks! you can send a PR to the app demo, i think is totally outdated and needs a revamp too.

stephpy commented 10 years ago

@cordoval yep, app demo is outdated. I didn't found time to maintain it :\

cordoval commented 10 years ago

i will do it :+1:

Booklab commented 10 years ago

Ok, I let you guys do that and thanks for your amazing work.

cordoval commented 10 years ago

reopen this, we will close it when it is done

cordoval commented 10 years ago

after it is merged it can be closed

stephpy commented 10 years ago

:+1: