Sort by property of Json
field
#24122
Labels
kind/feature
A request for a new feature.
team/client
Issue for team Client.
team/schema
Issue for team Schema.
topic: Json
Scalar type `Json`
topic: orderBy / sorting
Problem
At the moment looks impossible - through Prisma - to define sort order by property of json field. Postgres allow this with the following syntax (for instance):
select id, "additionalFields"->'jsonProperty'->>'fieldName' from "Table" t
order by "additionalFields"->'jsonProperty'->>'fieldName' desc
Suggested solution
Associate a new SortOrderJson class to json fields, where a property "path" can define the property to sort for
The text was updated successfully, but these errors were encountered: