aboutsummaryrefslogtreecommitdiff
path: root/relationship
diff options
context:
space:
mode:
Diffstat (limited to 'relationship')
-rw-r--r--relationship/driver.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/relationship/driver.cxx b/relationship/driver.cxx
index 9af06a2..27a31b2 100644
--- a/relationship/driver.cxx
+++ b/relationship/driver.cxx
@@ -132,10 +132,9 @@ main (int argc, char* argv[])
shared_ptr<employer> csi (db->load<employer> ("Complex Systems Inc"));
shared_ptr<project> ch (db->load<project> ("Complex Hardware"));
- result r (db->query<employee> (query::first == "John" &&
- query::last == "Doe"));
-
- shared_ptr<employee> john (r.begin ().load ());
+ shared_ptr<employee> john (
+ db->query_one<employee> (query::first == "John" &&
+ query::last == "Doe"));
john->employer (csi);
john->projects ().clear ();