diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-17 11:11:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-17 11:11:43 +0200 |
commit | 791b94b894f93bc037637907616efc844f3d9414 (patch) | |
tree | 27b8d92cbe5f7918109842d36484fb4b639a020c /doc/manual.xhtml | |
parent | 565ad74e164abdaaa31de146a1ef76f3d3f6734d (diff) |
Add support for defining composite values inside persistent classes, etc
Diffstat (limited to 'doc/manual.xhtml')
-rw-r--r-- | doc/manual.xhtml | 24 |
1 files changed, 24 insertions, 0 deletions
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 }; </pre> + <p>A composite value type can be defined inside a persistent class, + view, or another composite value and even made private, provided + we make <code>odb::access</code> a friend of the containing class, + for example:</p> + +<pre class="cxx"> +#pragma db object +class person +{ + ... + + #pragma db value + class name + { + ... + + std::string first_; + std::string last_; + }; + + name name_; +}; + </pre> + <p>A composite value type can also be defined as an instantiation of a C++ class template, for example:</p> |