Skip to content

[BUG] "Could not resolve reference to DataModelField" when using abstract field in future() #1695

@onimitch

Description

@onimitch

Description and expected behavior

abstract model SoftDelete {
    deleted Int @default(0) @omit
}

model MyModel extends SoftDelete {
    id      String @id @default(cuid())
    name    String

    @@deny('update', deleted != 0 && future().deleted != 0)
}

The above @deny rule errors: Could not resolve reference to DataModelField named 'deleted'.

Workaround for now: Place the deny rule in the abstract model.

Environment (please complete the following information)

  • ZenStack version: 2.5.1
  • Prisma version: 5.18.0
  • Database type: Postgresql

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions