You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated NH from 5.2.6 to 5.4.1 and I found an important regression. I've read breaking-changes but can't find anything related. The bug is serious because it doesn't return the expected records. Let me explain better: I have a Customer class which exposes 2 properties of the same type (Agent): Agent1 and Agent2. Doing a where to see if there is an Agent1 with Id ='a' or an Agent2 with Id ='b', the query returns no results if m.NotFound(NotFoundMode.Ignore) is specified in the mapping. If you delete m.NotFound(NotFoundMode.Ignore) everything returns as before. Same result if I test for the same value Agent1.Id='a' Or Agent2.Id='a': again with m.NotFound(NotFoundMode.Ignore) does an inner join instead of a left join and nothing comes back. The last working version of NH is 5.2.7. Since 5.3 it doesn't work anymore.
hello @bahusoid thanks for the fix and sorry for the question: is the release of NH 5.4.2 expected soon? Otherwise in production environment I'm forced to revert to NH 5.2.6.
fredericDelaporte
changed the title
[Regression] Starting with NH 5.3, an or clause in a where condition return a wrong result if not-found-ignore is enabled
"Or" clause in a "where" condition returns a wrong result with not-found-ignore
Apr 2, 2023
I have updated NH from 5.2.6 to 5.4.1 and I found an important regression. I've read breaking-changes but can't find anything related. The bug is serious because it doesn't return the expected records. Let me explain better: I have a Customer class which exposes 2 properties of the same type (Agent): Agent1 and Agent2. Doing a where to see if there is an Agent1 with Id ='a' or an Agent2 with Id ='b', the query returns no results if m.NotFound(NotFoundMode.Ignore) is specified in the mapping. If you delete m.NotFound(NotFoundMode.Ignore) everything returns as before. Same result if I test for the same value Agent1.Id='a' Or Agent2.Id='a': again with m.NotFound(NotFoundMode.Ignore) does an inner join instead of a left join and nothing comes back. The last working version of NH is 5.2.7. Since 5.3 it doesn't work anymore.
I attach testcase.zip for fast review.
Maybe related to #1948?
The text was updated successfully, but these errors were encountered: