From c93d7f6453f8aebdc80fba44032f692eb5da8a9c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 4 Sep 2013 12:57:25 +0200 Subject: Container versioning support --- odb/relational/inline.hxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'odb/relational/inline.hxx') 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; -- cgit v1.1