aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hello/driver.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/hello/driver.cxx b/hello/driver.cxx
index 348efdb..e7bc114 100644
--- a/hello/driver.cxx
+++ b/hello/driver.cxx
@@ -77,9 +77,9 @@ main (int argc, char* argv[])
t.commit ();
}
- /*
// Alternative implementation without using the id.
//
+ /*
{
transaction t (db->begin_transaction ());
@@ -90,7 +90,7 @@ main (int argc, char* argv[])
if (i != r.end ())
{
- auto_ptr<person> joe (*i);
+ auto_ptr<person> joe (i.load ());
joe->age (joe->age () + 1);
db->update (*joe);
}
@@ -99,6 +99,7 @@ main (int argc, char* argv[])
}
*/
+
// John Doe is no longer in our database.
//
{