Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.3
-
Fix Version/s: None
-
Component/s: ORM
-
Labels:
Description
Steps to reproduce the problem?
- A custom DBAL type, that extends a scalar build-in type e.g. DBAL\Types\StringType
- convertToPHPValue of custom DBAL type returns an instance of a class (implements __toString method)
- Custom DBAL type is used as primary key in an entity
- initially persist entity and flush entity manager
- modify entity (keep same primary key) and persist entity again causes:
Warning: Illegal offset type in isset or empty in vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php line 2407
I guess the solution in Doctrine\ORM\Internal\Hydration namespace by explicit converting result of convertToPHPValue if result is not a scalar value.
Related to
DDC-1998, tests this behavior