mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2246: ORM\UnitOfWork::getEntityState() crash when using a new Entity with association composite key #2828
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 (Jan 17, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user keksnicoh:
I already found a similar issue report but it seems to be not solved completely:
http://doctrine-project.org/jira/browse/DDC-1382
I did something like this (mock): (Metadata cache is OFF)
$someCompositeEntity = new SomeCompositeEntity;
$someCompositeEntity->setUser($userEntity);
$someCompositeEntity->setAnotherRelation($anotherRelationEntity);
// Note: $userEntity & $anotherRelationEntity are managed by UOW.
$uow = $em->getUnitOfWork();
var_dump($uow->getEntityState($someCompositeEntity));
-- EXPECTED: --
bool(false)
-- ACTUAL RESULT: --
PHP Error [4096]
Object of class Application\Model\Db\Entity\User could not be converted to string (/Users/keksnicoh/lokalhorst/FinQ/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2754)
@doctrinebot commented on GitHub (Jan 20, 2013):
Comment created by @beberlei:
Fixed and merged into 2.3.x branch
@doctrinebot commented on GitHub (Jan 20, 2013):
Issue was closed with resolution "Fixed"