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
v6 - using populate true in find returns wrong reference type #4920
Comments
This is actually pretty hard to fix (spent the whole afternoon on this yesterday and it's still not done) due to the populate hint being I wonder if it would be better to remove the boolean signature in favor of edit: we could even keep it as is so its not breaking, but only respect |
I will end up with |
When populating all relations, the `Loaded` type will now respect `*` in the populate hint. The old boolean variant is now removed in favor of new `populate: ['*']`. > This also applies to the `serialize()` helper and its `populate` parameter. ```diff const users = await em.find(User, {}, { - populate: true, + populate: ['*'], }); ``` `populate: false` is still allowed and serves as a way to disable eager loaded properties. Closes #4920
When populating all relations, the `Loaded` type will now respect `*` in the populate hint. The old boolean variant is now removed in favor of new `populate: ['*']`. > This also applies to the `serialize()` helper and its `populate` parameter. ```diff const users = await em.find(User, {}, { - populate: true, + populate: ['*'], }); ``` `populate: false` is still allowed and serves as a way to disable eager loaded properties. Closes #4920
When populating all relations, the `Loaded` type will now respect `*` in the populate hint. The old boolean variant is now removed in favor of new `populate: ['*']`. > This also applies to the `serialize()` helper and its `populate` parameter. ```diff const users = await em.find(User, {}, { - populate: true, + populate: ['*'], }); ``` `populate: false` is still allowed and serves as a way to disable eager loaded properties. Closes #4920
When populating all relations, the `Loaded` type will now respect `*` in the populate hint. The old boolean variant is now removed in favor of new `populate: ['*']`. > This also applies to the `serialize()` helper and its `populate` parameter. ```diff const users = await em.find(User, {}, { - populate: true, + populate: ['*'], }); ``` `populate: false` is still allowed and serves as a way to disable eager loaded properties. Closes #4920
When populating all relations, the `Loaded` type will now respect `*` in the populate hint. The old boolean variant is now removed in favor of new `populate: ['*']`. > This also applies to the `serialize()` helper and its `populate` parameter. ```diff const users = await em.find(User, {}, { - populate: true, + populate: ['*'], }); ``` `populate: false` is still allowed and serves as a way to disable eager loaded properties. Closes #4920
Describe the bug
using populate true in find returns wrong reference type
Error:
Property '$' does not exist on type '{} & Reference'
But when i use
populate: ['jobSeeker']
it worksThe text was updated successfully, but these errors were encountered: