mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3025: Mapping drivers do not honor scale or precision for identifier fields #3757
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Mar 12, 2014).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user huda.salam:
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 :
<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 :
@franky-net commented on GitHub (Feb 23, 2016):
Hi,
we have exactly the same problem.
In Doctrine\ORM\Mapping\Driver/YamlDriver.php in the "public function loadMetadataForClass($className, ClassMetadata $metadata)" there are for id-elements some parameters which are included in the mapping (starting at line 264):
Here the parameters "precision" and "scale" are missing. Probably just need to be supplemented here the missing values :