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
Added test that parentId
is not undefined when using fetchAll
with relations
#1769
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small problem. I just ran the proposed test against master
and it passed correctly. Can you verify?
It wasn't for me 🤔But i was on |
Probably fixed in #1716. |
So yeah on 0.10.3 this test fails when i remove my code adaptions. We could still merge test improvements to assert that |
Sure, merging just the test sounds good to me. |
Yeah maybe.
Furthermore: https://github.com/bookshelf/bookshelf/blob/master/src/base/eager.js#L52 This calls e.g. |
Could be. I never delved too deep into the relations code. Are you going to investigate? It's quite possible that your fix is better than the already merged one, in which case it should be replaced. The current test suite has a test in place for #629. |
Yes will do. But not before next week 👍Will report back here. |
I have not investigated much, but my gut feeling tells me to keep the fix in master as is. I'll just update my PR to check that the relational data is not undefined. |
9333df9
to
a98284a
Compare
…h relations no issue
a98284a
to
c8d8e95
Compare
parentId
is undefined when using fetchAll
with relationsparentId
is not undefined when using fetchAll
with relations
- i discovered two bookshelf bugs on 0.10.3 - bookshelf/bookshelf#1769 - bookshelf/bookshelf#1768 - we are currently locked to 0.10.3, because we saw a connection problem when updating to the latest knex+bookshelf - using a tarball can trouble when installing deps - we saw this in the past - e.g. you have bookshelf already installed - now you switch to a tarball - neither yarn, nor npm are able to replace the dep - require bookshelf-0.10.3
no issue