From 32f09571e564c42c04acdba2cf139a507aa4b0da Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 15 Dec 2014 13:52:26 +0200 Subject: Fix bug in id-based custom view join of polymorphic objects See email from Mikhail.Tomilov@infotecs.ru/12-Dec-2014. --- common/inheritance/polymorphism/driver.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'common/inheritance/polymorphism/driver.cxx') 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 result; + + transaction t (db->begin ()); + + { + result qr (db->query ()); + 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. -- cgit v1.1