From 3f7ad004b2f3492df604ef548624b1a027c7f058 Mon Sep 17 00:00:00 2001 From: bergmann Date: Mon, 8 Apr 2019 19:34:11 +0200 Subject: [PATCH] * fixed bug: exception when dataset is updated, but no was value changed --- src/cpphibernate/driver/mariadb/schema/table.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpphibernate/driver/mariadb/schema/table.cpp b/src/cpphibernate/driver/mariadb/schema/table.cpp index c19cfe3..baae21e 100644 --- a/src/cpphibernate/driver/mariadb/schema/table.cpp +++ b/src/cpphibernate/driver/mariadb/schema/table.cpp @@ -1357,8 +1357,8 @@ std::string table_t::execute_create_update( else { auto count = connection.execute_rows(*statement); - if (count != 1) - throw misc::hibernate_exception("Expected exaclty one row to be inserted/updated!"); + if (count > 1) + throw misc::hibernate_exception("Expected one/ row to be inserted/updated!"); cpphibernate_debug_log(count << " rows inserted/updated"); } primary_key_field->set(context, primary_key);