From 791b94b894f93bc037637907616efc844f3d9414 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 Sep 2013 11:11:43 +0200 Subject: Add support for defining composite values inside persistent classes, etc --- doc/manual.xhtml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'doc/manual.xhtml') diff --git a/doc/manual.xhtml b/doc/manual.xhtml index f754e40..c84f1bc 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -7442,6 +7442,30 @@ class person }; +

A composite value type can be defined inside a persistent class, + view, or another composite value and even made private, provided + we make odb::access a friend of the containing class, + for example:

+ +
+#pragma db object
+class person
+{
+  ...
+
+  #pragma db value
+  class name
+  {
+    ...
+
+    std::string first_;
+    std::string last_;
+  };
+
+  name name_;
+};
+  
+

A composite value type can also be defined as an instantiation of a C++ class template, for example:

-- cgit v1.1