We use ODataQueryOptions<TEntity>.ApplyTo .NET method to apply OData query parameters to KORM query. If ORDER BY clause in OData query is using nullable field (column), the condition is generated this way: IIF(($item.Field == null), null, $item.Field). This cannot be used as ORDER BY for SQL query. When the value of FixOrderByNullableColumnInODataQuery is true, this case is fixed when generating SQL. Only $item.Field is used in SQL's ORDER BY.
Fixes #90
We useORDER BY clause in OData query is using nullable field (column), the condition is generated this way: ORDER BY for SQL query. When the value of
ODataQueryOptions<TEntity>.ApplyTo
.NET method to apply OData query parameters to KORM query. IfIIF(($item.Field == null), null, $item.Field)
. This cannot be used asFixOrderByNullableColumnInODataQuery
istrue
, this case is fixed when generating SQL. Only$item.Field
is used in SQL'sORDER BY
.