Lalabuy
Lalabuy

Reputation: 65

How to force insert Alice fixtures?

I'm getting the problem with references in Alice fixtures. I would like to insert the value, not the reference, coz later on i would like to insert this data in existing database.

Account_User2:
    # Generated here
    account_id (unique): 1
    account_type_id: 2 # <- here i would like to insert int, not reference
    user_id: '@User2->user_id'
    account_title: '@User2->first_name @User2->last_name'
    is_enabled: 1

Alice 3+

Php 7+

Error:

Expected value of type "\AccountType" for association field "\Account#$account_type_id", got "integer" instead.

Any ideas how to force insert value but not the reference?

Upvotes: 0

Views: 347

Answers (1)

Zak
Zak

Reputation: 1165

There's an issue and an answer about that on github : https://github.com/hautelook/AliceBundle/issues/443

Upvotes: 1

Related Questions