github SeaQL/sea-orm 2.0.0-rc.29

15 hours ago
  • Add missing lifetime hint to EntityName::table_name (#2907)
  • [sea-orm-cli] Fix codegen to not generate relations to filtered entities (#2913)
  • [sea-orm-cli] Fix enum variants starting with digits (#2905)
  • Add wrapper type for storing Uuids as TEXT (#2914)
  • Optimize exists; PaginatorTrait::exists is moved to SelectExt (#2909)
  • Add tracing spans for database operations (#2885)
  • Fix derive enums without per-case rename (#2922)
  • Fix DeriveIntoActiveModel on Option<T> fields (#2926)
#[derive(DeriveIntoActiveModel)]
#[sea_orm(active_model = "<fruit::Entity as EntityTrait>::ActiveModel")]
struct PartialFruit {
    cake_id: Option<i32>,
}

assert_eq!(
    PartialFruit { cake_id: Some(1) }.into_active_model(),
    fruit::ActiveModel {
        id: NotSet,
        name: NotSet,
        cake_id: Set(Some(1)),
    }
);
  • FromQueryResult now supports nullable nested model (#2845)
#[derive(FromQueryResult)]
struct CakeWithOptionalBakeryModel {
    #[sea_orm(alias = "cake_id")]
    id: i32,
    #[sea_orm(alias = "cake_name")]
    name: String,
    #[sea_orm(nested)]
    bakery: Option<bakery::Model>, // can be null
}

Don't miss a new sea-orm release

NewReleases is sending notifications on new releases.