github SeaQL/sea-orm 1.1.15

2 days ago

Enhancements

  • Allow DerivePartialModel to have nested aliases #2686
#[derive(DerivePartialModel)]
#[sea_orm(entity = "bakery::Entity", from_query_result)]
struct Factory {
    id: i32,
    #[sea_orm(from_col = "name")]
    plant: String,
}

#[derive(DerivePartialModel)]
#[sea_orm(entity = "cake::Entity", from_query_result)]
struct CakeFactory {
    id: i32,
    name: String,
    #[sea_orm(nested, alias = "factory")] // <- new
    bakery: Option<Factory>,
}
  • Add ActiveModelTrait::try_set #2706
fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value);
/// New: a non-panicking version of above
fn try_set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value) -> Result<(), DbErr>;

Bug Fixes

  • [sea-orm-cli] Fix compilation issue #2713

Don't miss a new sea-orm release

NewReleases is sending notifications on new releases.