Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCOM-287: [GH-369] [RFC] Load parent classes when loading metadata from cache #27

Open
doctrinebot opened this issue May 22, 2015 · 1 comment
Labels
Bug Something isn't working

Comments

@doctrinebot
Copy link

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 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?

@doctrinebot
Copy link
Author

Comment created by gvf:

Have you had the chance to look at this issue? thnxs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants