-
Notifications
You must be signed in to change notification settings - Fork 639
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
Help needed with relationMappings and eager loading #1350
Comments
Yes it does. |
Oh, there was a question at the bottom. I thought this was just one of those "your code that has 3600 tests doesn't work!#"!#!"#!"!!" issues. Is the name of the |
Thank you a lot for the quick response, and I'm sorry about not to be obvious enough. After searching a lot, I finally found a 3rd party dependency, which breaks eager relation. It is not a problem related to PostgreSQL. Please observe a test project to investigate it. https://github.com/vladimirice/objection-postgresql If I add this dependency, an error occurs. I use this dependency for one of my projects. A project above is just a sample project to reproduce an issue. Maybe It is not a problem of objectionjs. Maybe a dependency Maybe this issue can help you to improve something in objection.js. Thanks! UPD: |
The conflict happens when Nothing related to node-dependency-injection |
@zazoomauro thanks a lot for the investigation. Yes, the problem is related to @koskimas I investigate this issue at least four hour. Is it possible to somehow avoid objectionjs errors related to I think it is a good proposal to aviod such kind of vulnerability Thanks a lot for you work |
It's possible, but I won't do that. No library should ever change the built-in methods like |
How to reproduce
Very simplified tables
Models
A request somewhere
Response is:
The error is happened here - empty array is returned
https://github.com/Vincit/objection.js/blob/master/lib/relations/RelationProperty.js#L205
A dirty fix:
https://github.com/Vincit/objection.js/blob/master/lib/utils/objectUtils.js#L64
change the last line
from
return Array.from(map.values());
to
return Array.from(map);
Please, help. What I'm doing wrong? :(
The text was updated successfully, but these errors were encountered: