diff options
-rw-r--r-- | mssql/types/driver.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mssql/types/driver.cxx b/mssql/types/driver.cxx index 1c2d7d8..33b606e 100644 --- a/mssql/types/driver.cxx +++ b/mssql/types/driver.cxx @@ -9,6 +9,7 @@ #include <cassert> #include <iostream> +#include <odb/exceptions.hxx> #include <odb/mssql/database.hxx> #include <odb/mssql/transaction.hxx> @@ -285,8 +286,17 @@ main (int argc, char* argv[]) p->str += 'd'; db->update (*p); assert (p->version > o.version); + o.str += 'D'; + try + { + db->update (o); + assert (false); + } + catch (const odb::object_changed&) {} db->reload (o); assert (o.version == p->version); + o.str += 'D'; + db->update (o); t.commit (); } } |