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
There is LINQ translation support for Nullable<T>.HasValue in the v3 SDK. However, the translation assumes the property must be missing or undefined in the underlying document. It ignores the fact that it might also be null and that the .HasValue property in .NET is the idiomatic (and only) way to query for that, given that .NET lacks any distinction between null and undefined.
DaRosenberg
changed the title
LINQ translation for Nullable<T>.HasValue incorrectly translates to IS_DEFINED() - should be IS_NULL() OR IS_DEFINED()
LINQ translation for Nullable<T>.HasValue incorrectly translates to IS_DEFINED() - should be (NOT IS_NULL()) OR IS_DEFINED()
Nov 26, 2024
@HEBOS That will not even compile I think - you can't use a Nullable<T> as a boolean expression C# (like you can in JavaScript). You can only do compare it to null or use the HasValue property.
Describe the bug
There is LINQ translation support for
Nullable<T>.HasValue
in the v3 SDK. However, the translation assumes the property must be missing orundefined
in the underlying document. It ignores the fact that it might also benull
and that the.HasValue
property in .NET is the idiomatic (and only) way to query for that, given that .NET lacks any distinction betweennull
andundefined
.To Reproduce
Expected behavior
Actual behavior
(This misses documents where
nullableValue == null
in the database.)Environment summary
SDK Version: 3.41.0
The text was updated successfully, but these errors were encountered: