You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to use SeaORM with Poem OpenAPI to create my backend, however I'm having a problem related to DateTimes right now.
In order to use a SeaORM entity with Poem it seems I have to #[derive(Object)], from poem_openapi if not I get
the trait bound poem_openapi::payload::Json<entity::user::Model>: poem_openapi::ApiExtractor<'_> is not satisfied the trait poem_openapi::ApiExtractor<'a> is implemented for poem_openapi::payload::Json<T>
However right now I have an entity that has a DateTime field and when I try to derive poem_openapi::Object I get the following error:
the associated item IS_REQUIRED exists for struct DateTime, but its trait bounds were not satisfied the following trait bounds were not satisfied: sea_orm::prelude::DateTime: poem_openapi::types::Type which is required by &sea_orm::prelude::DateTime: poem_openapi::types::Type
I'm quite new to Rust and I'm not really sure how to continue after this, any help would be much appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I'm trying to use SeaORM with Poem OpenAPI to create my backend, however I'm having a problem related to DateTimes right now.
In order to use a SeaORM entity with Poem it seems I have to #[derive(Object)], from poem_openapi if not I get
the trait bound poem_openapi::payload::Json<entity::user::Model>: poem_openapi::ApiExtractor<'_> is not satisfied the trait poem_openapi::ApiExtractor<'a> is implemented for poem_openapi::payload::Json<T>
However right now I have an entity that has a DateTime field and when I try to derive poem_openapi::Object I get the following error:
the associated item IS_REQUIRED exists for struct DateTime, but its trait bounds were not satisfied the following trait bounds were not satisfied: sea_orm::prelude::DateTime: poem_openapi::types::Type which is required by &sea_orm::prelude::DateTime: poem_openapi::types::Type
I'm quite new to Rust and I'm not really sure how to continue after this, any help would be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions