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

PostLoad event on fetch joined entities - Lifecycle Callback not firing #6568

Closed
stoccc opened this issue Jul 21, 2017 · 4 comments
Closed
Assignees

Comments

@stoccc
Copy link
Contributor

stoccc commented Jul 21, 2017

I have a problem with a Lifecycle Callback of Doctrine ORM: the callback is not executed on fetch-joined entities, while it's regularly executed on entities that are lazy-loaded.

Is there a bug in the ObjectHydrator, or it is a lack of documentation about that?

See this question on stackoverflow

@Ocramius
Copy link
Member

Ocramius commented Jul 21, 2017 via email

@Ocramius Ocramius changed the title PostLoad event on fetch joined entities - Lifecycle Callback PostLoad event on fetch joined entities - Lifecycle Callback not firing Jul 21, 2017
stoccc added a commit to stoccc/doctrine2 that referenced this issue Jul 21, 2017
@stoccc
Copy link
Contributor Author

stoccc commented Jul 21, 2017

I'm not so expert, I hope I did the right thing!

@Ocramius
Copy link
Member

@stoccc test looks good, thanks!

@stoccc
Copy link
Contributor Author

stoccc commented Jul 21, 2017

@Ocramius
I fixed the patch, and now all tests pass correctly.
I think you should remove Bug label, but you gained a test case :)

The problem was in my application, I was using in PostLoad of the root entity some informations setted in PostLoad of the fetchjoined entities, but certainly no one can guarantee me that one PostLoad is executed before or after some other PostLoad.

I close, thanks for your time.

@stoccc stoccc closed this as completed Jul 21, 2017
@Ocramius Ocramius self-assigned this Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants