You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be done more neatly, but before putting more time in it I'd like to check if it's a good idea.
I came across this solution because we had a problem with Gedmo extensions when caching metadata in Redis, this is our scenario:
Class A extends B;
Class B has a Gedmo extension mapped field.
On first request metadata for both Class A and Class B is cached in Redis.
On second request AbstractClassMetadataFactory loads Class A from Redis.
Gedmo extension loops through all Class A parents and calls method hasMetadataFor($parentClass) in AbstractClassMetadataFactory, only Class A metadata has been loaded previously, therefore hasMetadataFor($parentClass) returns false, and Gedmo then skips the parent class.
Should Gedmo exension load the metadata for the parent class or should it be done as proposed in this PR?
The text was updated successfully, but these errors were encountered:
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of gonzalovilaseca:
Url: doctrine/common#369
Message:
This can be done more neatly, but before putting more time in it I'd like to check if it's a good idea.
I came across this solution because we had a problem with Gedmo extensions when caching metadata in Redis, this is our scenario:
Class B
has aGedmo extension
mapped field.On first request metadata for both
Class A
andClass B
is cached in Redis.On second request
AbstractClassMetadataFactory
loadsClass A
from Redis.Gedmo extension loops through all
Class A
parents and calls methodhasMetadataFor($parentClass)
inAbstractClassMetadataFactory
, onlyClass A
metadata has been loaded previously, thereforehasMetadataFor($parentClass)
returns false, andGedmo
then skips the parent class.Should Gedmo exension load the metadata for the parent class or should it be done as proposed in this PR?
The text was updated successfully, but these errors were encountered: