Skip to content

Policy compilation errors with deep nested post-update rules #1381

Closed
@ymc9

Description

@ymc9
        model M1 {
            id String @id @default(uuid())
            value Int
            m2 M2?
            @@allow('read', true)
            @@allow('update', value > 0 && future().m2.m3?[value > 0])
        }

        model M2 {
            id String @id @default(uuid())
            m1 M1 @relation(fields: [m1Id], references:[id])
            m1Id String @unique
            m3 M3[]
            @@allow('all', true)
        }

        model M3 {
            id String @id @default(uuid())
            value Int
            m2 M2 @relation(fields: [m2Id], references:[id])
            m2Id String

            @@allow('all', true)
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions