Skip to content

1.1.16

Choose a tag to compare

@tyt2y3 tyt2y3 released this 11 Sep 16:28
· 27 commits to 1.1.x since this release

Bug Fixes

  • Fix enum casting in DerivePartialModel #2719 #2720
#[derive(DerivePartialModel)]
#[sea_orm(entity = "active_enum::Entity", from_query_result, alias = "zzz")]
struct PartialWithEnumAndAlias {
    #[sea_orm(from_col = "tea")]
    foo: Option<Tea>,
}

let sql = active_enum::Entity::find()
    .into_partial_model::<PartialWithEnumAndAlias>()
    .into_statement(DbBackend::Postgres)
    .sql;

assert_eq!(
    sql,
    r#"SELECT CAST("zzz"."tea" AS "text") AS "foo" FROM "public"."active_enum""#,
);

Enhancements

  • [sea-orm-cli] Use tokio (optional) instead of async-std #2721