eav-manager
eav-manager copied to clipboard
Identifier constraints shared between Families
I have a first family called Brand
sidus_eav_model:
families:
Brand:
data_class: AppBundle\Entity\Brand
instantiable: true
attributeAsIdentifier: code
attributeAsLabel: label
attributes:
code:
type: string_identifier
label:
type: string
and a second family called Gipa
sidus_eav_model:
families:
Gipa:
data_class: AppBundle\Entity\Gipa
instantiable: true
attributeAsIdentifier: code
attributeAsLabel: label
attributes:
code:
type: string_identifier
type:
type: string
label:
type: string
The both families are identified by an attribute named code.
If I have imported a Brand line with a code value "ZE", I cannot import a Gipa line with the code value "ZE".
[UnexpectedValueException]
Invalid fixtures data for family 'Gipa' (reference: ZE) and property 'code' : 'The same value already exists', given 'ZE'