-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
DateTimeWithTimeZone
does not implement Serialize
and Deserialize
#319
Comments
Hey @YoshieraHuang, would you mind showing us the detail compile errors? |
This is my scripts: #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "materials")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub created_at: DateTimeWithTimeZone,
pub updated_at: DateTimeWithTimeZone,
pub name: String,
#[sea_orm(column_type = "Text", nullable)]
pub description: Option<String>,
pub tag_ids: Vec<u8>,
} And this is the error:
|
According to chronotope/chrono#515, the |
Correct! Should be fixed by #320
I'm not sure about this |
The |
Welcome! :) |
`with-json` feature requires `chrono/serde`
Hi.
sea-orm
useDateTimeWithTimeZone
inModel
to mapTIMESTAMPTZ
in postgresql.DateTimeWithTimeZone
is just an alias of typechrono::DateTime<chrono::FixedOffset>
, which has already implementedSerialze
andDeserialize
traits inchrono
crate. However, the compiler saysDateTimeWithTimeZone
does not implementSerialize
andDeserialize
in the generated scripts. It is weird. My rust version is1.56.1
, and thesea-orm
is synced with themaster
branch in this repository.The text was updated successfully, but these errors were encountered: