Skip to content
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

DeriveActiveEnum requires use sea_orm::ColumnTypeTrait in 0.11 #1478

Closed
lpotthast opened this issue Feb 15, 2023 · 4 comments
Closed

DeriveActiveEnum requires use sea_orm::ColumnTypeTrait in 0.11 #1478

lpotthast opened this issue Feb 15, 2023 · 4 comments

Comments

@lpotthast
Copy link

After migrating sea-orm from 0.10 to 0.11, enums deriving DeriveActiveEnum suddenly need the ColumnTypeTrait to be put in scope by the user, which was not required previously. The macro implementation should reference the required def function by its absolute path so that the additional use requirement is not needed.

@tyt2y3
Copy link
Member

tyt2y3 commented Feb 16, 2023

This seems to be a bug we can fix in a patch release.
ColumnTypeTrait is put in prelude so it should work in entitiy files.
What are the error messages?
Can you give a minimal example or steps to reproduce?

@panviktor
Copy link

the whole project is broken, need revert to the 10th version, the same errors everywhere:

   |
19 |         user_id: Set(user_id.to_string()),
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `migration::sea_orm::ActiveValue`, found enum `sea_orm::ActiveValue`
   |
   = note: enum `sea_orm::ActiveValue` and enum `migration::sea_orm::ActiveValue` have similar names, but are actually distinct types

@tyt2y3
Copy link
Member

tyt2y3 commented Feb 18, 2023

@panviktor Yours is a different problem. I think you may need to update both sea-orm and sea-orm-migration version.

tyt2y3 added a commit that referenced this issue Feb 18, 2023
@tyt2y3 tyt2y3 closed this as completed Feb 18, 2023
@tyt2y3
Copy link
Member

tyt2y3 commented Mar 10, 2023

Released in 0.11.1

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

No branches or pull requests

3 participants