mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2862: When update cached entitiy, entity lost OneToOne relationship #3573
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 (Dec 18, 2013).
Jira issue originally created by user coollamer:
Second-level-cache
$driver = $em->find('CachedDoctrine\Entities\Driver', 1); //Get cached entity
dump($driver->getUserProfile()); //Return User
$driver->setName('Franta');
$em->flush();
$em->clear();
$driver = $em->find('CachedDoctrine\Entities\Driver', 1);
dump($driver->getUserProfile() ); //Return null
@doctrinebot commented on GitHub (Dec 18, 2013):
Comment created by @beberlei:
assigned to Fabio
@doctrinebot commented on GitHub (Dec 18, 2013):
Comment created by @FabioBatSilva:
Can you please attached your entities ?
@doctrinebot commented on GitHub (Dec 19, 2013):
Comment created by coollamer:
I attach the files.
Is it from project:
https://github.com/CoolLamer/CachedDoctrine
files is from:
https://github.com/CoolLamer/CachedDoctrine/blob/master/app/model/Entities/Driver.php
https://github.com/CoolLamer/CachedDoctrine/blob/master/app/model/Entities/User.php
@doctrinebot commented on GitHub (Jan 6, 2014):
Comment created by coollamer:
The entity is not stored in the cache until the parameter of its subordinate entities is loaded. Entities are same.
Example:
$driver = $em->find('CachedDoctrine\Entities\Driver', 1); //load from db
$em->clear();
$driver = $em->find('CachedDoctrine\Entities\Driver', 1); //again load from db
$driver->getUserProfile()->getName() //Access parametr
$em->clear();
$driver = $em->find('CachedDoctrine\Entities\Driver', 1); //now load from cache
@doctrinebot commented on GitHub (Feb 10, 2014):
Comment created by @FabioBatSilva:
Fixed by :
960fbfc110@doctrinebot commented on GitHub (Feb 10, 2014):
Issue was closed with resolution "Fixed"