-
Notifications
You must be signed in to change notification settings - Fork 933
Fix Get failing with a null exception #1924
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
Fix Get failing with a null exception #1924
Conversation
This comment has been minimized.
This comment has been minimized.
I do not see how we could "get" a collection without having it previously loaded as an uninitialized proxy, but I still have changed in the same way its loading logic. (The nearer to a "get" for a collection would be an entity load with a collection fetch, but that does not trigger batching.) |
I was about to suggest writing a test for "collection case", but reading your last comment I understand this change was just "a safety net", right? |
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.
Now when always checking if keyIndex is null before calling GetSortedKeyIndexes
, it's clearer to do a single null check inside that method I think.
Yes. There is no |
Great! Thanks! |
@RogerKratz thanks for the provided test! It's my bad that I didn't tested this scenario. |
Better add them here I think. It would have avoided to lose the improvements already done here, like generating the async tests for GH1920 tests (and some white-space cleanup in them). |
I've made a PR as I can't push directly to this one. |
Indeed, you are not among NHibernate "members". |
Replaced by #1925. |
Fixes #1920