OdataToEntity
OdataToEntity copied to clipboard
xml data type cannot be compared or sorted except when using the is null operator
Hello :)
Running 2.8.0, does the OData parser adds each fields in the "Order By" SQL request?
I have a SQL view named View_MyTable
below that i query using OData:
select Id, cast(MY_NTEXT_FIELD as XML) as [MyXmlField] from MyTable
But i receive a xml data type cannot be compared or sorted except when using the is null operator
error.
SQL query being executed looks like this:
SELECT TOP(@__p_0) [o].[id], [o].[MyXmlField]
FROM [View_MyTable] AS [o]
ORDER BY [o].[id], [o].[MyXmlField]
The XML data type field should not be used in the ORDER BY clause.
Do you have any idea how to fix this?
Kind regards