sea-orm/tests/impl_from_for_active_model.rs
Jonas Platte ead131d937
Use input ident instead of associated type projections in ActiveModel derive (#2349)
* Use input ident instead of associated type projections in ActiveModel derive

* Add a test
2024-10-25 11:04:35 +01:00

16 lines
260 B
Rust

use sea_orm::{tests_cfg::cake, Set};
struct Cake {
id: i32,
name: String,
}
impl From<Cake> for cake::ActiveModel {
fn from(value: Cake) -> Self {
Self {
id: Set(value.id),
name: Set(value.name),
}
}
}