DDC-3027: Embeddables on mapped supper classes #3761

Open
opened 2026-01-22 14:27:37 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 13, 2014).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user mac_nibblet:

If you have a embeddable on a mapped superclass you get the following error

<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping>
    <embeddable name="DealFinder\Core\ValueObject\Coordinates">
        <field name="latitude"  type="float" precision="10" scale="6" nullable="true"/>
        <field name="longitude" type="float" precision="10" scale="6" nullable="true"/>
    </embeddable>
</doctrine-mapping>

Doctrine\ORM\Mapping\MappingException: Duplicate definition of column 'coordinates_latitude' on entity 'DealFinder\Location\Entity\LocationEntity' in a field or discriminator column mapping.

Moving it to the entity mapping resolves the issues but gives you duplicated code.

Originally created by @doctrinebot on GitHub (Mar 13, 2014). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user mac_nibblet: If you have a embeddable on a mapped superclass you get the following error ``` xml <?xml version="1.0" encoding="utf-8"?> <doctrine-mapping> <embeddable name="DealFinder\Core\ValueObject\Coordinates"> <field name="latitude" type="float" precision="10" scale="6" nullable="true"/> <field name="longitude" type="float" precision="10" scale="6" nullable="true"/> </embeddable> </doctrine-mapping> ``` `Doctrine\ORM\Mapping\MappingException: Duplicate definition of column 'coordinates_latitude' on entity 'DealFinder\Location\Entity\LocationEntity' in a field or discriminator column mapping.` Moving it to the entity mapping resolves the issues but gives you duplicated code.
admin added the Bug label 2026-01-22 14:27:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3761