Skip to content

Incorrect prisma query executed when count using a where filter involving a polymorphic base field #1585

@ymc9

Description

@ymc9
model Asset {
     id Int @id @default(autoincrement())
     type String
     views Int

     @@allow('all', true)
     @@delegate(type)
}
            
model Post extends Asset {
    title String
}
db.post.count({
    where: { views: { gt: 0 } },
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions