Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3027

Embeddables on mapped supper classes

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: ORM
    • Labels:
      None
    • Environment:
      Deb 7.3, php 5.5.10-1~dotdeb

      Description

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Antoine Hedgecock
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: