-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
DeriveValueType relies on a QueryResult import #1855
Comments
Thanks for the report! I think we should patch this |
tyt2y3
added a commit
that referenced
this issue
Sep 12, 2023
🎉 Released In 0.12.3 🎉Thank you everyone for the contribution! |
bobogei81123
added a commit
to bobogei81123/sea-orm
that referenced
this issue
Jan 5, 2024
`DeriveValueType` proc macro relies on several sea-orm types to be imported. This is partially fixed in SeaQL#1855 by fully qualifying `sea_orm::QueryResult`, but others like `sea_orm::Value` is still not being qualified. Also, if use defined a type alias on `std::result::Result`, it can cause the proc macro to generate code that won't compile. - Fully qualify `sea_orm::Value`, `std::string::String`, and `std::result::Result` in `DeriveValueType` proc macro. - Add some simple integration tests for this. - Add doc and doc test in `sea_orm_macro::derive_value_type`.
1 task
tyt2y3
pushed a commit
that referenced
this issue
Jan 14, 2024
`DeriveValueType` proc macro relies on several sea-orm types to be imported. This is partially fixed in #1855 by fully qualifying `sea_orm::QueryResult`, but others like `sea_orm::Value` is still not being qualified. Also, if use defined a type alias on `std::result::Result`, it can cause the proc macro to generate code that won't compile. - Fully qualify `sea_orm::Value`, `std::string::String`, and `std::result::Result` in `DeriveValueType` proc macro. - Add some simple integration tests for this. - Add doc and doc test in `sea_orm_macro::derive_value_type`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When using
#[derive(DeriveValueType)]
, the generated code refers to a nakedQueryType
, which breaks if it's not imported.Steps to Reproduce
Expected Behavior
Compiles
Actual Behavior
cannot find type
QueryResultin this scope
Workarounds
use sea_orm::QueryResult;
Versions
12.0 (DeriveValueType was introduced in 12.0)
The text was updated successfully, but these errors were encountered: