The source proxy generator emits sortBy helpers for every result field, including complex ones such as records, nested models and polymorphic types. In the #167 comparison fixture, these are detail and notice. The TypeScript server's compareValues (Source/Core/queries/queryRendering.ts) falls back to String(left).localeCompare(String(right)). Every object compares as "[object Object]", so the request succeeds but leaves the order unchanged. Arc for .NET has the same limitation: on an in-memory IQueryable, OrderBy over a non-comparable record throws.
Acceptance:
- Emit sort helpers only for comparable scalar fields: string, number, boolean, Date, Guid, enum and concepts over those.
- The server rejects a sort on a non-scalar field with a 400 validation result, rather than silently not sorting.
- Specs cover both, using multiple distinct rows.
The source proxy generator emits
sortByhelpers for every result field, including complex ones such as records, nested models and polymorphic types. In the #167 comparison fixture, these aredetailandnotice. The TypeScript server'scompareValues(Source/Core/queries/queryRendering.ts) falls back toString(left).localeCompare(String(right)). Every object compares as"[object Object]", so the request succeeds but leaves the order unchanged. Arc for .NET has the same limitation: on an in-memoryIQueryable,OrderByover a non-comparable record throws.Acceptance: