github SeaQL/sea-orm 1.0.0-rc.2

latest releases: 1.1.1, 1.1.0, 1.1.0-rc.3...
pre-release8 months ago

Breaking Changes

  • Updated Strum to version 0.26 #2088
  • Renamed ConnectOptions::pool_options() to ConnectOptions::sqlx_pool_options() #2145
  • Made sqlx_common private, hiding sqlx_error_to_xxx_err #2145

Enhancements

  • [sea-orm-cli] Fix migrate generate on empty mod.rs files #2064
  • DerivePartialModel macro attribute entity now supports syn::Type #2137
#[derive(DerivePartialModel)]
#[sea_orm(entity = "<entity::Model as ModelTrait>::Entity")]
struct EntityNameNotAIdent {
    #[sea_orm(from_col = "foo2")]
    _foo: i32,
    #[sea_orm(from_col = "bar2")]
    _bar: String,
}
  • Added RelationDef::from_alias() #2146
assert_eq!(
    cake::Entity::find()
        .join_as(
            JoinType::LeftJoin,
            cake_filling::Relation::Cake.def().rev(),
            cf.clone()
        )
        .join(
            JoinType::LeftJoin,
            cake_filling::Relation::Filling.def().from_alias(cf)
        )
        .build(DbBackend::MySql)
        .to_string(),
    [
        "SELECT `cake`.`id`, `cake`.`name` FROM `cake`",
        "LEFT JOIN `cake_filling` AS `cf` ON `cake`.`id` = `cf`.`cake_id`",
        "LEFT JOIN `filling` ON `cf`.`filling_id` = `filling`.`id`",
    ]
    .join(" ")
);

Upgrades

  • Upgrade sea-schema to 0.15.0-rc.3

House keeping

  • Improved Actix example to return 404 not found on unexpected inputs #2140
  • Re-enable rocket_okapi example #2136

Don't miss a new sea-orm release

NewReleases is sending notifications on new releases.