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

No connect within the create of a connect_or_create clause #1047

Open
mariomeissner opened this issue Nov 23, 2024 · 0 comments
Open

No connect within the create of a connect_or_create clause #1047

mariomeissner opened this issue Nov 23, 2024 · 0 comments

Comments

@mariomeissner
Copy link

Bug description

Can't seem to perform a connect within the create of a connect_or_create clause.

How to reproduce

The following query works in TypeScript Prisma:

data: {
        content,
        role,
        thread: {
          connectOrCreate: {
            where: { id: threadId },
            create: {
              id: threadId,
              name: "New thread",
              workspace: {
                connect: { slug: workspaceSlug },
              },
              createdBy: { connect: { id: userId } },
            },
          },
        },

Expected behavior

I expected to be able to do the same in Python, but workspace was not an available field within the create field. I was only able to specify workspaceId.

Prisma information

prisma == 0.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant