diff options
Diffstat (limited to 'odb/database.txx')
-rw-r--r-- | odb/database.txx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/odb/database.txx b/odb/database.txx index a46b8b0..f04931b 100644 --- a/odb/database.txx +++ b/odb/database.txx @@ -301,7 +301,11 @@ namespace odb typedef object_traits_impl<object_type, DB> object_traits; - multiple_exceptions mex (typeid (object_not_persistent)); + multiple_exceptions mex ( + object_traits::managed_optimistic_column_count == 0 + ? typeid (object_not_persistent) + : typeid (object_changed)); + try { while (b != e && (cont || mex.empty ())) @@ -426,7 +430,11 @@ namespace odb typedef object_traits_impl<object_type, DB> object_traits; - multiple_exceptions mex (typeid (object_not_persistent)); + multiple_exceptions mex ( + object_traits::managed_optimistic_column_count == 0 + ? typeid (object_not_persistent) + : typeid (object_changed)); + try { while (b != e && (cont || mex.empty ())) |