From 09d7377f81aeb8fde4aa1698e946457f03380d45 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 May 2013 12:05:39 +0200 Subject: Add support for object sections Sections are an optimization mechanism that allows the partitioning of data members of a persistent class into groups that can be separately loaded and/or updated. --- odb/relational/common.hxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'odb/relational/common.hxx') diff --git a/odb/relational/common.hxx b/odb/relational/common.hxx index 1e6a319..abe5e31 100644 --- a/odb/relational/common.hxx +++ b/odb/relational/common.hxx @@ -19,21 +19,25 @@ namespace relational member_base (semantics::type* type, string const& fq_type, - string const& key_prefix) + string const& key_prefix, + object_section* section = 0) : type_override_ (type), fq_type_override_ (fq_type), - key_prefix_ (key_prefix) + key_prefix_ (key_prefix), + section_ (section) { } member_base (string const& var, semantics::type* type, string const& fq_type, - string const& key_prefix) + string const& key_prefix, + object_section* section = 0) : var_override_ (var), type_override_ (type), fq_type_override_ (fq_type), - key_prefix_ (key_prefix) + key_prefix_ (key_prefix), + section_ (section) { } @@ -47,6 +51,7 @@ namespace relational semantics::type* type_override_; string fq_type_override_; string key_prefix_; + object_section* section_; }; // Template argument is the database SQL type (sql_type). -- cgit v1.1