eav-manager icon indicating copy to clipboard operation
eav-manager copied to clipboard

Identifier constraints shared between Families

Open jycamier opened this issue 7 years ago • 0 comments

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'

jycamier avatar Apr 27 '17 13:04 jycamier