Breaking Changes
- Updated Strum to version 0.26 #2088
- Renamed
ConnectOptions::pool_options()
toConnectOptions::sqlx_pool_options()
#2145 - Made
sqlx_common
private, hidingsqlx_error_to_xxx_err
#2145
Enhancements
- [sea-orm-cli] Fix
migrate generate
on emptymod.rs
files #2064 DerivePartialModel
macro attributeentity
now supportssyn::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
to0.15.0-rc.3