8000 Embedded mapping cannot be overridden · Issue #6047 · doctrine/orm · GitHub
[go: up one dir, main page]

Skip to content
Embedded mapping cannot be overridden #6047
@GrandLTU

Description

@GrandLTU

When adding properties of embedded class to AttributeOverrides mapping fails.

 * @ORM\AttributeOverrides({
 *      @ORM\AttributeOverride(name="embedded.property1", column= @ORM\Column(nullable=true, type="date")),
 *      @ORM\AttributeOverride(name="embedded.property2", column= @ORM\Column(nullable=true, type="string")),
 * })

When adding overrides to the same class as where embeddable is added:

 $ bin/console doctrine:schema:validate


  [Doctrine\ORM\Mapping\MappingException]                                                          
  Invalid field override named 'embedded.property1' for class 'AppBundle\Entity\EnitityWithEmbedded'.

When adding overrides to class which extends class where embeddable is added:

bin/console doctrine:schema:validate


  [ReflectionException]                                                           
  Property AppBundle\Entity\EnitityWithEmbeddedExtended::$embedded.property1 does not exist  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0