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
eager loading not working with nested populate using find query #5057
Comments
This is actually caused by you passing the const authors = await orm.em.find(
Author,
{ firstName: 'Jon' },
{ populate: ['books.genre'] },
); |
Hmm okay. But it feels a bit like inconsistent behavior because it works for a findOne query in my example to populate
So I would expect that it also should not work for a fineOne query |
I closed the issue with a fix, I guess you missed that? Otherwise I'd rather expect "thank you" instead of "hmm okay" :D |
Sorry, my bad. I didn't saw the fix. Thanks for fixing and Happy New Year 🎉. |
Describe the bug
When I call a find query with a populate then the eager loading is not working for the nested populated entity.
Let's say we have the following query:
On the Genre entity there is another ManyToOne property with the option
eager: true
.I would now expect this property is also populated. This case was working for us on mirko-orm v5.
You can see the full reproduciton in the provided github repo
Reproduction
https://github.com/dimitriSaplatkin/reproduction
What driver are you using?
@mikro-orm/postgresql
MikroORM version
6
Node.js version
20
Operating system
Ubuntu 23
Validations
The text was updated successfully, but these errors were encountered: