Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FixturesBundle] Fix for fixtures populator entity array #671

Merged
merged 1 commit into from
Sep 1, 2015
Merged

[FixturesBundle] Fix for fixtures populator entity array #671

merged 1 commit into from
Sep 1, 2015

Conversation

virtualize
Copy link
Contributor

If your fixtures contain an array of related entities like this

\App\SiteBundle\Entity\Pages\ArticlePage:
    article_{1..25}:
        categories: [@cat_1, @cat_4]
        ...

You end up with following error, as the entity references in this array are not treated as entities while populatoring: Expected value of type "Doctrine\Common\Collections\Collection|array" for association field "App\SiteBundle\Entity\Pages\ArticlePage#$categories", got "Kunstmaan\Fixtures Bundle\Loader\Fixture" instead.

This pull request takes care of this, although I guess there might be some prettier way...

@virtualize virtualize changed the title Fix for fixtures populator entity array [FixturesBundle] Fix for fixtures populator entity array Aug 31, 2015
@roderik roderik added this to the 3.3.0 milestone Sep 1, 2015
roderik pushed a commit that referenced this pull request Sep 1, 2015
[FixturesBundle] Fix for fixtures populator entity array
@roderik roderik merged commit 20d3a10 into Kunstmaan:master Sep 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants