-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
populate issue introduced with 5.7.x #4899
Comments
I need to see a complete reproduction for such issues, including the data, you mentioned #4339, that issue is closed with a passing test case, so ideally adjust that test so it fails.
This means you have a version mismatch, some of your packages are newer than the core package. But let's not deal with it (it's actually already fixed in recent versions which pin the internal dependencies), let's talk about the latest stable (which is 5.9.2, not 5.9.1, but I don't think there were relevant fixes in the last release anyway), or even better about the latest 5.x dev release. FYI edit: I guess you are using joined strategy? also are we talking about how entities are hydrated or how they look when serialized? |
I have used the default loadStrategy so far. I wasn't aware of that option. I guess with postgres it makes sense to make joined the default loadStrategy? In any way, this worked before 5.7.x with the default strategy and now it doesn't. Was it a bug that it worked before? I've created a test-case here: https://github.com/SantoJambit/mikro-orm/blob/GH4899/tests/issues/GH4899.test.ts |
Interesting, let me take a closer look. The end goal is to have both strategies work the same. |
Thanks! |
Describe the bug
Using populate does not work as expected after an update. The last working version I found is 5.6.16. Did not try V6 yet, as it's not final.
I have the following tables:
I left out parts that did not seem relevant.
I want to get all users that have a specified skill and list/populate all the skills each user has.
My Query was like this:
This was populating all of the
user.userSkills.skill.*
fields before 5.7.x, but afterwards I noticeduser.userSkills.skill.label
was not set. Interestingly, when I change the populate line to this, it works:Just using "skill" doesn't work either:
I don't care about "skill", as I already know the input skill. I care about all the other skills, which are available via
user.userSkills.skill
.To Reproduce
Steps to reproduce the behavior:
TypeError: core_1.Utils.mergeConfig is not a function
)Expected behavior
Populate should work as before.
Additional context
I found an issue, which might be related, but was marked as fixed: #4339
I think it might have the same root cause, as "skill" exists in multiple places here too.
Versions
The text was updated successfully, but these errors were encountered: