-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
Use full qualifier in derives #1665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @AlbertMarashi, thanks for the help!! I think we have a few more to fix. Thanks a lot!!
sea-orm/sea-orm-macros/src/derives/active_model.rs
Lines 201 to 223 in 59e3ba8
Ok(quote!( #[automatically_derived] impl std::convert::TryFrom<ActiveModel> for <Entity as EntityTrait>::Model { type Error = sea_orm::DbErr; fn try_from(a: ActiveModel) -> Result<Self, sea_orm::DbErr> { #(if matches!(a.#active_model_field, sea_orm::ActiveValue::NotSet) { return Err(sea_orm::DbErr::AttrNotSet(stringify!(#active_model_field).to_owned())); })* Ok( Self { #(#model_field: #model_field_value),* } ) } } #[automatically_derived] impl sea_orm::TryIntoModel<<Entity as EntityTrait>::Model> for ActiveModel { fn try_into_model(self) -> Result<<Entity as EntityTrait>::Model, sea_orm::DbErr> { self.try_into() } } ))
Added missing sea_orm qualifier
@billy1624 done. I'm not entirely sure if these were in any other files either |
@billy1624 bump |
The DeriveActiveModel macro assumes entity::prelude is imported in scope, but I guess no harm to fully-qualify? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!! @AlbertMarashi
Will this get merged? |
thanks for the nudge. yes I'll merge it |
🎉 Released In 1.0.0 🎉Thank you everyone for the contribution! |
PR Info
Closes
Dependencies:
Dependents:
New Features
Bug Fixes
Breaking Changes
Changes