New JSON traversal doesn't work in order option
Created by: cjevning
The new JSON traversal methods work well in the criteria object, however they don't seem to work when used in the query options, for example I have a JSONB column timing
and can select timing.claim
but if I wanted to order by it, using timing.claim
results in a 42P01
error from postgres, while using the standard PG form (timing->>'claim'
) works as expected.
order: [{ field: "timing.claim", direction: 'desc' }] // doesn't work, 42P01
order: [{ field: "timing->>'claim'", direction: 'desc' }] // works fine
Not sure if this is a bug or if this is expected behavior, although if it's the intended behavior it may be worth making that more clear in the documentation.