mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Floats in $orgValue are strings in UnitOfWork::computeChangeSet #5483
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 @curiosity26 on GitHub (Mar 27, 2017).
Originally assigned to: @lcobucci on GitHub.
The
$actualValueheld in the entity is a valid float/double but the value held in the$orgValueis a string.Causes this assertion to fail in UnitOfWork on line 668:
Here's the field referenced in the entity:
The Database is PostgreSQL 9.6.
@lcobucci commented on GitHub (Mar 27, 2017):
@curiosity26
floatanddecimalare different types for storages and DBAL. If you want to have a float and deal with floating-point precision you should use@ORM\Column(type="float", ...).More info: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#decimal-types
@lcobucci commented on GitHub (Mar 27, 2017):
Closing as
invalidsince it's a usage/mapping issue.