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
Just by switching your custom serializer to inherit from 'CosmosSerializer' to 'CosmosLinqSerializer' this breaks any usage of ExtensionData in queries.
With custom serializer support, we should add detection of STJ-based 'ExtensionData' attribute in addition to the newtonsoft one. See #3777
Expected behavior
ExtensionData part of the path should be skipped in the generated SQL query:
i.e. MyObject.ExtensionData.MyCustomProperty > 42 becomes MyObject.MyCustomProperty > 42
Actual behavior MyObject.ExtensionData.MyCustomProperty is retained, breaking the query, since STJ serializes MyCustomProperty to the root of the object.
Also, you cannot utilize CosmosLinqSerializer if you are trying to query against JSON ExtensionData.
Environment summary
SDK Version: 3.39.0-preview.0
OS Version (e.g. Windows, Linux, MacOSX): Windows 11
onionhammer
changed the title
Custom serializer support for LINQ (#4138) breaks ExtensionData LINQ support #3834
Custom serializer support for LINQ (#4138) should support STJ ExtensionData
Feb 1, 2024
Just by switching your custom serializer to inherit from 'CosmosSerializer' to 'CosmosLinqSerializer' this breaks any usage of ExtensionData in queries.
With custom serializer support, we should add detection of STJ-based 'ExtensionData' attribute in addition to the newtonsoft one. See #3777
Expected behavior
ExtensionData part of the path should be skipped in the generated SQL query:
i.e.
MyObject.ExtensionData.MyCustomProperty > 42
becomesMyObject.MyCustomProperty > 42
Actual behavior
MyObject.ExtensionData.MyCustomProperty
is retained, breaking the query, since STJ serializesMyCustomProperty
to the root of the object.Also, you cannot utilize
CosmosLinqSerializer
if you are trying to query against JSON ExtensionData.Environment summary
SDK Version: 3.39.0-preview.0
OS Version (e.g. Windows, Linux, MacOSX): Windows 11
Additional context
#3777
#3834
#4138
@Maya-Painter
The text was updated successfully, but these errors were encountered: