aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-11-14 16:24:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-11-14 16:24:50 +0200
commit0d90255b54daafff9de1f4fee4cfee722e02171a (patch)
treeac1a87a0f5d750cea6038d6b46710412d85e4a20 /common
parent64b27b86025d160e49bf617143d80671ccb1e0e4 (diff)
Old interface compatibility and testing fixes
Now all tests pass for both Oracle and SQL Server.
Diffstat (limited to 'common')
-rw-r--r--common/auto/test.hxx2
-rw-r--r--common/section/basics/driver.cxx14
2 files changed, 15 insertions, 1 deletions
diff --git a/common/auto/test.hxx b/common/auto/test.hxx
index 61fbcc6..0e7585e 100644
--- a/common/auto/test.hxx
+++ b/common/auto/test.hxx
@@ -35,7 +35,7 @@ private:
struct auto_only
{
#pragma db auto id
- unsigned long id_;
+ unsigned short id_;
};
#endif // TEST_HXX
diff --git a/common/section/basics/driver.cxx b/common/section/basics/driver.cxx
index f34ed90..a2b7006 100644
--- a/common/section/basics/driver.cxx
+++ b/common/section/basics/driver.cxx
@@ -1273,6 +1273,13 @@ main (int argc, char* argv[])
db->update (o1, o1.s);
assert (o.v != o1.v);
+ // Double-check object version was updated.
+ //
+ {
+ auto_ptr<object> p1 (db->load<object> (o.id));
+ assert (o1.v == p1->v);
+ }
+
try
{
db->load (*p, p->s);
@@ -1393,6 +1400,13 @@ main (int argc, char* argv[])
db->update (o1, o1.s);
assert (o.v != o1.v);
+ // Double-check object version was updated.
+ //
+ {
+ auto_ptr<object> p1 (db->load<object> (o.id));
+ assert (o1.v == p1->v);
+ }
+
try
{
db->load (*p, p->s);