Skip to content

Prepared statement needs to be re-prepared with sql views #1099

@jemink

Description

@jemink

I created sql views with two tables called Draft

CREATE VIEW `Draft` AS
    SELECT company.address as address, company.id as id
    FROM `company`, `admin`
    WHERE `company`.`company_id` = `admin`.`id`;

Then added Draft model inside the schema.prisma like below

model Draft {
  id      Int    @unique
  address String
}

But when I run this query in playground I am getting below error with node js and with playground

const data = await ctx.prisma.draft.findMany({})

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions