Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in update with empty disconnect field #3169

Closed
oceandrama opened this issue Jul 29, 2020 · 2 comments · Fixed by prisma/prisma-engines#1064
Closed

Error in update with empty disconnect field #3169

oceandrama opened this issue Jul 29, 2020 · 2 comments · Fixed by prisma/prisma-engines#1064
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. tech/engines/query engine Issue in the Query Engine tech/engines Issue for tech Engines. topic: broken query
Milestone

Comments

@oceandrama
Copy link

Schema

model Report {
    id Int @default(autoincrement()) @id
}

model Annotation {
    id      Int      @default(autoincrement()) @id
    reports Report[]
}

Query

prisma.annotation.update({
  where: {
    id: 1,
  },
  data: {
    reports: {
      disconnect: [],
    },
  },
});

Error

Invalid `prisma.annotation.update()` invocation. The records for relation `AnnotationToReport` between the `Annotation` and `Report` models are not connected.

Expected
No changes in entity without error

@oceandrama oceandrama changed the title Error in update with empty disconnect filed Error in update with empty disconnect field Jul 29, 2020
@divyenduz divyenduz added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. labels Jul 30, 2020
@ryands17
Copy link

@divyenduz I can reproduce this on SQLite using version 2.3.0

@divyenduz divyenduz added bug/2-confirmed Bug has been reproduced and confirmed. process/candidate and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Jul 30, 2020
@maoosi
Copy link

maoosi commented Aug 5, 2020

Facing the same issue as well and I believe connected to #3069

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. tech/engines/query engine Issue in the Query Engine tech/engines Issue for tech Engines. topic: broken query
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants