From 095c4948735a4f24aadf61ca6e3c6794163ce4b1 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 16 Oct 2024 13:10:32 +0200 Subject: [PATCH] Add a test --- tests/impl_from_for_active_model.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/impl_from_for_active_model.rs diff --git a/tests/impl_from_for_active_model.rs b/tests/impl_from_for_active_model.rs new file mode 100644 index 000000000..81dfaac9a --- /dev/null +++ b/tests/impl_from_for_active_model.rs @@ -0,0 +1,15 @@ +use sea_orm::{tests_cfg::cake, Set}; + +struct Cake { + id: i32, + name: String, +} + +impl From for cake::ActiveModel { + fn from(value: Cake) -> Self { + Self { + id: Set(value.id), + name: Set(value.name), + } + } +}