dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 376 forks source link

Fixed async accessors all named undefinedAsync #809

Closed maritaria closed 7 years ago

tttmaximttt commented 7 years ago

Really I didn't know how we miss this, because all tests pass and we test it I'm sure. Good job.

tttmaximttt commented 7 years ago

@maritaria - can you tell how you reproduce this bug, because I think that this case should be covered by tests

anton-locomote commented 7 years ago

Agree with @tttmaximttt. We updated a lot of tests https://github.com/dresende/node-orm2/pull/807/commits/907400531dcb4325a87a4cecda451f7a6eadc139 so those tests that related to accessors also passed without issues.
It will be very good if you could describe in what situation you find this error, so we can look if we have something similar in other part of async functionality. Thank you

maritaria commented 7 years ago

I found this because I kept missing accessors being added to the original model when enabling reverse for hasMany relations. I added some print statements to the hasMany function to see what was actually happening.