aboutsummaryrefslogtreecommitdiff
path: root/composite/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-08 17:27:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-08 17:27:40 +0200
commit24f87489a4d315cc01ca9d49a3f0209522fe6729 (patch)
tree260a5479af34c9452679d63f9c892288417acac4 /composite/driver.cxx
parent0431bdb607d898c1efb59211568b43ebd6890e25 (diff)
Add support for defining composite value type as class template instantiations
Diffstat (limited to 'composite/driver.cxx')
-rw-r--r--composite/driver.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/composite/driver.cxx b/composite/driver.cxx
index 56be15d..346e768 100644
--- a/composite/driver.cxx
+++ b/composite/driver.cxx
@@ -27,7 +27,7 @@ main (int argc, char* argv[])
//
unsigned int id;
{
- person p ("Joe", "Dirt", "Mr");
+ person p ("Joe", "Dirt", "Mr", phone_numbers ("555 5555", "666 6666"));
transaction t (db->begin ());
id = db->persist (p);
@@ -49,7 +49,7 @@ main (int argc, char* argv[])
t.commit ();
}
- // Print the name information.
+ // Print the name and phone numbers.
//
{
transaction t (db->begin ());
@@ -71,6 +71,9 @@ main (int argc, char* argv[])
{
cout << " alias: " << i->first () << " " << i->last () << endl;
}
+
+ cout << " phone 1: " << joe->phone ().first << endl;
+ cout << " phone 2: " << joe->phone ().second << endl;
}
// Query the database for a person object.