From 8bfbf3344e33013177125ad26eab2f88e948a459 Mon Sep 17 00:00:00 2001 From: Raphael Etim Date: Thu, 5 Dec 2024 11:42:45 +0100 Subject: [PATCH] Add a section to the FAQ on order by prop of a Json value This addresses this doc [issue](https://github.com/prisma/docs/issues/42660) --- .../100-working-with-json-fields.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx b/content/200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx index e58a2cfc52..4b423b1d51 100644 --- a/content/200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx +++ b/content/200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx @@ -1001,6 +1001,10 @@ No - it is not yet possible to filter on the presence of a specific key. No - [case insensitive filtering](https://github.com/prisma/prisma/issues/7390) is not yet supported. +### Can you sort an object property of a Json value? + +No - [Sorting](https://github.com/prisma/prisma/issues/10346) an object property (order-by-prop) of a Json value is not yet supported. + ### How to set a default value for JSON fields? When you want to set a `@default` value the `Json` type, you need to enclose it with double-quotes inside the `@default` attribute (and potentially escape any "inner" double-quotes using a backslash), for example: @@ -1011,4 +1015,4 @@ model User { json1 Json @default("[]") json2 Json @default("{ \"hello\": \"world\" }") } -``` \ No newline at end of file +```