diff --git a/sea-orm-macros/src/derives/active_model.rs b/sea-orm-macros/src/derives/active_model.rs index eed3dac0..43efe6b6 100644 --- a/sea-orm-macros/src/derives/active_model.rs +++ b/sea-orm-macros/src/derives/active_model.rs @@ -194,10 +194,10 @@ fn derive_into_model(model_fields: IntoIter) -> syn::Result Ok(quote!( #[automatically_derived] impl std::convert::TryFrom for ::Model { - type Error = DbErr; - fn try_from(a: ActiveModel) -> Result { + type Error = sea_orm::DbErr; + fn try_from(a: ActiveModel) -> Result { #(if matches!(a.#active_model_field, sea_orm::ActiveValue::NotSet) { - return Err(DbErr::AttrNotSet(stringify!(#active_model_field).to_owned())); + return Err(sea_orm::DbErr::AttrNotSet(stringify!(#active_model_field).to_owned())); })* Ok( Self { @@ -209,7 +209,7 @@ fn derive_into_model(model_fields: IntoIter) -> syn::Result #[automatically_derived] impl sea_orm::TryIntoModel<::Model> for ActiveModel { - fn try_into_model(self) -> Result<::Model, DbErr> { + fn try_into_model(self) -> Result<::Model, sea_orm::DbErr> { self.try_into() } }