-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Issue summary
DataExchange query fails when filtering on a nullable DateTime field.
Error
System.InvalidCastException: Invalid cast from 'System.DateTime' to 'System.Nullable<System.DateTime>'
What happens
During query filter execution, the predicate builder attempts to convert a DateTime value to Nullable, which causes an invalid cast and crashes the Blazor circuit.
Relevant stack trace
System.Convert.DefaultToType(...)
AXOpen.Data.Query.PredicateBuilder.BuildLambdaPredicate(...)
AXOpen.Data.Query.QueryExtensions.AddQuerySymbolToPredicates(...)
AXOpen.Data.Query.DataExchangeQuery.ExecuteFilter()
AXOpen.Data.Query.DataExchangeQuery...BuildRenderTree...
Microsoft.AspNetCore.Components...
Likely cause
The query layer does not correctly handle nullable DateTime properties when building filter predicates. It appears to treat the target type as Nullable but performs conversion as if it were a direct cast from DateTime.