From 72c6fc8931f00fa6f914c17e41ad166220effbcf Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Tue, 24 Dec 2024 19:32:26 +0800 Subject: [PATCH] Fix TryInsert as well (#2459) --- src/query/insert.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/query/insert.rs b/src/query/insert.rs index 502f9a9fd..697f208d2 100644 --- a/src/query/insert.rs +++ b/src/query/insert.rs @@ -427,9 +427,7 @@ where M: IntoActiveModel, I: IntoIterator, { - for model in models.into_iter() { - self.insert_struct = self.insert_struct.add(model); - } + self.insert_struct = self.insert_struct.add_many(models); self }