Skip to content

Can't reference entities' ID inside a Fixtures Set #55

@gido

Description

@gido

I'm trying do achieve the following tricks.

From the Alice 1.x documentations:

You can reference entities' ID but you will then have to split fixtures in multiple files (this is because objects are persisted at the end of each file processing) :

# fixture_user.yml
Nelmio\Entity\User:
    # ...
# fixture_group.yml
Nelmio\Entity\Group:
    group1:
        name: Admins
        owner: @user1->id

Maybe there is something I miss but it look like objects are not persisted at the end of each file when I use Fixtures Set. Is it true or what did I miss ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions