Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
genu opened this issue Nov 13, 2024 · 1 comment
Milestone

Comments

@genu
Copy link
Contributor

genu commented Nov 13, 2024

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.

@ymc9
Copy link
Member

ymc9 commented Nov 19, 2024

Fixed in 2.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants