Skip to content


DDC-2862: When update cached entitiy, entity lost OneToOne relationship #3618

doctrinebot opened this Issue · 6 comments

1 participant


Jira issue originally created by user coollamer:


$driver = $em->find('CachedDoctrine\Entities\Driver', 1); //Get cached entity
dump($driver->getUserProfile()); //Return User

$driver = $em->find('CachedDoctrine\Entities\Driver', 1);
dump($driver->getUserProfile() ); //Return null


Comment created by @beberlei:

assigned to Fabio


Comment created by @FabioBatSilva:

Can you please attached your entities ?


Comment created by coollamer:

The entity is not stored in the cache until the parameter of its subordinate entities is loaded. Entities are same.

$driver = $em->find('CachedDoctrine\Entities\Driver', 1); //load from db

$driver = $em->find('CachedDoctrine\Entities\Driver', 1); //again load from db
$driver->getUserProfile()->getName() //Access parametr

$driver = $em->find('CachedDoctrine\Entities\Driver', 1); //now load from cache


Comment created by @FabioBatSilva:

Fixed by : 960fbfc


Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.5 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.