aboutsummaryrefslogtreecommitdiff
path: root/common/inheritance/polymorphism/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-12-15 13:52:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-12-15 13:52:26 +0200
commit32f09571e564c42c04acdba2cf139a507aa4b0da (patch)
tree557a104cf5098512fec7e9e8ac9b355cc0237fab /common/inheritance/polymorphism/driver.cxx
parent59e3ebcafb1dc4d54484143fc926ef8377bdb154 (diff)
Fix bug in id-based custom view join of polymorphic objects
See email from Mikhail.Tomilov@infotecs.ru/12-Dec-2014.
Diffstat (limited to 'common/inheritance/polymorphism/driver.cxx')
-rw-r--r--common/inheritance/polymorphism/driver.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/inheritance/polymorphism/driver.cxx b/common/inheritance/polymorphism/driver.cxx
index 672473c..d4509a4 100644
--- a/common/inheritance/polymorphism/driver.cxx
+++ b/common/inheritance/polymorphism/driver.cxx
@@ -968,6 +968,22 @@ main (int argc, char* argv[])
t.commit ();
}
+
+ {
+ typedef odb::result<view3> result;
+
+ transaction t (db->begin ());
+
+ {
+ result qr (db->query<view3> ());
+ result::iterator i (qr.begin ()), e (qr.end ());
+
+ assert (i != e && i->str == "abc");
+ assert (++i == e);
+ }
+
+ t.commit ();
+ }
}
// Test 5: polymorphism and optimistic concurrency.