Skip to content

"Reference not resolved" error when using an enum from an imported schema in @default #1849

@genu

Description

@genu

Description and expected behavior
When importing an enum from an imported schema, an error is thrown when using the value as defualt

import "./includes/enum"

model Post {
  ...
  status     Status   @default(PUBLISHED) <---throws "Reference not resolved: Status" error
  ...
}

This, however, works:

import "./includes/enum"

model Post {
  ...
  status     Status     <-- No error thrown
  ...
}

Environment (please complete the following information):

  • ZenStack version: 2.8.1
  • Database type: postgres

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions