aboutsummaryrefslogtreecommitdiff
path: root/odb/relational/inline.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-04 12:57:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-04 12:57:25 +0200
commitc93d7f6453f8aebdc80fba44032f692eb5da8a9c (patch)
tree441f2828cd354d925087a8728cab9a3ecfe8eee4 /odb/relational/inline.hxx
parenta7094314a7f3c7453025061efeacb0d52e1866af (diff)
Container versioning support
Diffstat (limited to 'odb/relational/inline.hxx')
-rw-r--r--odb/relational/inline.hxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/odb/relational/inline.hxx b/odb/relational/inline.hxx
index 8bdf5a6..f5c5102 100644
--- a/odb/relational/inline.hxx
+++ b/odb/relational/inline.hxx
@@ -53,7 +53,7 @@ namespace relational
if (av != 0)
os << "svm >= schema_version_migration (" << av << "ULL, true)";
- if (av != 0 || dv != 0)
+ if (av != 0 && dv != 0)
os << " &&" << endl;
if (dv != 0)
@@ -222,6 +222,8 @@ namespace relational
bool abst (abstract (c));
bool reuse_abst (abst && !poly);
+ bool versioned (context::versioned (c));
+
string const& type (class_fq_name (c));
string traits ("access::object_traits_impl< " + type + ", id_" +
db.string () + " >");
@@ -413,7 +415,13 @@ namespace relational
<< "void " << traits << "::" << endl
<< "load_ (statements_type&," << endl
<< "object_type& obj," << endl
- << "bool)"
+ << "bool";
+
+ if (versioned)
+ os << "," << endl
+ << "const schema_version_migration&";
+
+ os << ")"
<< "{"
<< "ODB_POTENTIALLY_UNUSED (obj);"
<< endl;