Skip to content

Relationships with default(auth().id) are still marked as required in the DMMF passed to the plugin #1893

Closed
@trancong12102

Description

@trancong12102

Description and expected behavior
Starting from version 2.8.0, the DMMF passed to the plugin does not respect the auth() function with the default attribute. As a result, relationships with a default value are still marked as required in the OpenAPI plugin.

Environment (please complete the following information):

  • ZenStack version: 2.9.3
  • Prisma version: 5.22.0
  • Database type: Postgresql

Additional context
I believe this issue is related to the release of version 2.8.0, which introduced a change where custom attributes in ZModel are no longer automatically passed to the generated Prisma schema as comments.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions