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

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-3025, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

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

            Dates

            • Created:
              Updated: