Inheritance on doctrine's embeddables Inheritance on doctrine's embeddables php php

Inheritance on doctrine's embeddables


If you want to extend one embeddable from another you need to set the parents properties as protected not private.

https://github.com/doctrine/doctrine2/issues/4097


If you want to use your Value Object in field then you should define new type in doctrine http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/custom-mapping-types.html

If you want inherit properties from base then you should use @MappedSuperclass annotation http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html

You should use @Embeddable when you want split entity by specific properties by creating specific entities. So you can't use Value Object as target. According to documentation (I'm not able to share third link).