aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-02-22 10:56:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-02-22 10:56:47 +0200
commitbd09e3ff6f089bd3fc109fd054d30a099e2722ab (patch)
tree02032f101c7fa9a9271a2c10f369cd81a192cebb /common
parent4a250a49537bf223b3665c0f5a017944531b3dfe (diff)
Fix iteration over uncached query result
Diffstat (limited to 'common')
-rw-r--r--common/query/driver.cxx11
-rw-r--r--common/query/test.std4
2 files changed, 15 insertions, 0 deletions
diff --git a/common/query/driver.cxx b/common/query/driver.cxx
index 6bef996..9d948cc 100644
--- a/common/query/driver.cxx
+++ b/common/query/driver.cxx
@@ -401,6 +401,17 @@ main (int argc, char* argv[])
t.commit ();
}
+
+ // Test uncached result.
+ //
+ cout << "test 015" << endl;
+ {
+ transaction t (db->begin ());
+ result r (db->query<person> (query::last_name == "Doe", false));
+ print (r);
+ t.commit ();
+ }
+
}
catch (const odb::exception& e)
{
diff --git a/common/query/test.std b/common/query/test.std
index 14f3205..978282a 100644
--- a/common/query/test.std
+++ b/common/query/test.std
@@ -92,3 +92,7 @@ test 013
Joe Squeaky Dirt 31 single
test 014
+test 015
+John Doe 30 married
+Jane Doe 29 married
+