From a89935fb695c58a31f94feccc6c2b59fea11bc07 Mon Sep 17 00:00:00 2001 From: Matthew Mueller Date: Fri, 9 Apr 2021 11:08:33 +0200 Subject: [PATCH 1/4] Update $disconnect remark Original issue: https://github.com/prisma/prisma/issues/3069 --- .../200-api-reference/050-prisma-client-reference.mdx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx index fa081f56af..e6fe738bbd 100644 --- a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx +++ b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx @@ -2998,11 +2998,7 @@ A nested `disconnect` query breaks the connection between a parent record and a #### Remarks - `disconnect` is only available if the relation is optional. -- Prisma Client throws an exception if the provided ID or unique identifier is not connected: - - ``` - The records for relation `PostToUser` between the `User` and `Post` models are not connected. - ``` +- If the relationship was already not connected the operation does nothing. #### Examples From a4939b099a771a3773fc5b5a67b32e2b70d79cb1 Mon Sep 17 00:00:00 2001 From: Martina Welander Date: Wed, 14 Apr 2021 09:02:07 +0200 Subject: [PATCH 2/4] Update content/400-reference/200-api-reference/050-prisma-client-reference.mdx --- .../200-api-reference/050-prisma-client-reference.mdx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx index e6fe738bbd..938097c1c5 100644 --- a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx +++ b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx @@ -2998,7 +2998,14 @@ A nested `disconnect` query breaks the connection between a parent record and a #### Remarks - `disconnect` is only available if the relation is optional. -- If the relationship was already not connected the operation does nothing. +- If the relationship you are attempting to disconnect does not exist: + + - ([In 2.21.0 and later](https://github.com/prisma/prisma/releases/tag/2.21.0)), the operation does nothing + - (Before 2.21.0) Prisma Client throws an exception if the provided ID or unique identifier is not connected: + + ``` + The records for relation `PostToUser` between the `User` and `Post` models are not connected. + ``` #### Examples From 4cb9b065ec96537efdb9c2f38caec83f8dcfedc2 Mon Sep 17 00:00:00 2001 From: Martina Welander Date: Wed, 14 Apr 2021 09:04:19 +0200 Subject: [PATCH 3/4] Update 050-prisma-client-reference.mdx --- .../200-api-reference/050-prisma-client-reference.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx index 938097c1c5..6b7cf8a406 100644 --- a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx +++ b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx @@ -3004,8 +3004,8 @@ A nested `disconnect` query breaks the connection between a parent record and a - (Before 2.21.0) Prisma Client throws an exception if the provided ID or unique identifier is not connected: ``` - The records for relation `PostToUser` between the `User` and `Post` models are not connected. - ``` + The records for relation `PostToUser` between the `User` and `Post` models are not connected. + ``` #### Examples From b40f9f78db897e12111632d7c979d803c0639e23 Mon Sep 17 00:00:00 2001 From: Martina Welander Date: Wed, 14 Apr 2021 09:05:36 +0200 Subject: [PATCH 4/4] Update 050-prisma-client-reference.mdx --- .../200-api-reference/050-prisma-client-reference.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx index 6b7cf8a406..19237aa04e 100644 --- a/content/400-reference/200-api-reference/050-prisma-client-reference.mdx +++ b/content/400-reference/200-api-reference/050-prisma-client-reference.mdx @@ -3003,9 +3003,9 @@ A nested `disconnect` query breaks the connection between a parent record and a - ([In 2.21.0 and later](https://github.com/prisma/prisma/releases/tag/2.21.0)), the operation does nothing - (Before 2.21.0) Prisma Client throws an exception if the provided ID or unique identifier is not connected: - ``` - The records for relation `PostToUser` between the `User` and `Post` models are not connected. - ``` + ``` + The records for relation `PostToUser` between the `User` and `Post` models are not connected. + ``` #### Examples