mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2960: Second level cache fatal error on assocations #3684
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 (Feb 6, 2014).
Jira issue originally created by user goetas:
After the first request, that puts in cache the entities, i get a fatal error:
Fatal error: Call to undefined method Doctrine\ORM\Persisters\BasicEntityPersister::getCacheRegion() in /vagrant/project/mercurio-rest/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php on line 128I have also posted a question that explain it with a example:
http://stackoverflow.com/questions/21577001/doctrine-second-level-cache-fatal-error-without-cache-on-entity
I don't know if is really related to @Cache annotation...
The fact is that
$assocPersister(https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php#L127) is not aCachedPersisterinstance.@doctrinebot commented on GitHub (Feb 6, 2014):
Comment created by goetas:
It happens when an entity is used as id fileld
@doctrinebot commented on GitHub (Feb 7, 2014):
Comment created by @FabioBatSilva:
You have to add
@Cacheto all associated entities.@doctrinebot commented on GitHub (Feb 7, 2014):
Comment created by goetas:
it is a little bit redundant... but acceptable... (is it used to discover in which region save the entity?)
I have tried to put @cache annotations, but when the entity has an association key, it results partially populated (just the primary key).
Anyway, a fatal error is a wrong user experience... it can be fixed
@doctrinebot commented on GitHub (Feb 12, 2014):
Comment created by goetas:
I think that this was fixed here
7e5a1c6b0d (diff-9f61d3a7fb0439833d89e2d120d298bc)Probably i have not merged the latest master.
@doctrinebot commented on GitHub (Feb 12, 2014):
Comment created by goetas:
Already fixed with
7e5a1c6b0d (diff-9f61d3a7fb0439833d89e2d120d298bc)@doctrinebot commented on GitHub (Feb 12, 2014):
Issue was closed with resolution "Invalid"