Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3025

Mapping drivers do not honor scale or precision for identifier fields

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.2
    • Fix Version/s: None
    • Component/s: Mapping Drivers, Tools
    • Security Level: All
    • Labels:
      None

      Description

      FYI. I don't use doctrine but with symfony2, and only use .yml or .xml mapping. Not yet try with annotation.

      These commands :

      php app\console doctrine:schema:update
      php app\console doctrine:schema:create

      Will not generate id's precision and scale for this kind of mapping :

      <doctrine-mapping .....>
        <entity name="Namespace\MyBundle\Entity\MyData" table="my_data">
          <id name="id" type="decimal" column="id" precision="x" scale="y">
            <generator strategy="IDENTITY"/>
          </id>
          <field ... />
        </entity>
      </ ....>

      Suggested changes :

      • Doctrine\ORM\Mapping\Driver\YamlDriver.php
      • Doctrine\ORM\Mapping\Driver\XmlDriver.php

        Activity

        huda salam created issue -
        Marco Pivetta made changes -
        Field Original Value New Value
        Description FYI. I don't use doctrine but with symfony2, and only use .yml or .xml mapping. Not yet try with annotation.

        These commands :

        > php app\console doctrine:schema:update
        > php app\console doctrine:schema:create

        Will not generate id's precision and scale for this kind of mapping :

        <doctrine-mapping .....>
          <entity name="Namespace\MyBundle\Entity\MyData" table="my_data">
            <id name="id" type="decimal" column="id" precision="x" scale="y">
              <generator strategy="IDENTITY"/>
            </id>
            <field ... />
          </entity>
        </ ....>

        Suggested changes :
        - Doctrine\ORM\Mapping\Driver\YamlDriver.php
        - Doctrine\ORM\Mapping\Driver\XmlDriver.php
        FYI. I don't use doctrine but with symfony2, and only use .yml or .xml mapping. Not yet try with annotation.

        These commands :

        {quote}php app\console doctrine:schema:update
        php app\console doctrine:schema:create{quote}

        Will not generate id's precision and scale for this kind of mapping :

        {code}<doctrine-mapping .....>
          <entity name="Namespace\MyBundle\Entity\MyData" table="my_data">
            <id name="id" type="decimal" column="id" precision="x" scale="y">
              <generator strategy="IDENTITY"/>
            </id>
            <field ... />
          </entity>
        </ ....>{code}

        Suggested changes :
        - Doctrine\ORM\Mapping\Driver\YamlDriver.php
        - Doctrine\ORM\Mapping\Driver\XmlDriver.php
        Marco Pivetta made changes -
        Summary Schema tool UPDATE or CREATE not generate decimal precision and scale for ID element Mapping drivers do not honor scale or precision for identifier fields

          People

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

            Dates

            • Created:
              Updated: