Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-jplatte committed Oct 16, 2024
1 parent 04b6c9a commit 095c494
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/impl_from_for_active_model.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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),
}
}
}

0 comments on commit 095c494

Please sign in to comment.