diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-20 06:48:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-20 06:48:28 +0200 |
commit | 8fceda2b30ecfa4458159e3c765e0aac7004f2f6 (patch) | |
tree | fc35dedf7e5bc5cfc1bc8e7458d986d7d8802c97 /odb/relational/header.cxx | |
parent | e85b07722107d00e4a3182ff4d33274a617bb55a (diff) | |
parent | 19ba3497c0788f02fc417f441d87c96ce23f9446 (diff) |
Merge branch 'master' into bulk
Diffstat (limited to 'odb/relational/header.cxx')
-rw-r--r-- | odb/relational/header.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/odb/relational/header.cxx b/odb/relational/header.cxx index 6584b8e..e8cba05 100644 --- a/odb/relational/header.cxx +++ b/odb/relational/header.cxx @@ -779,6 +779,7 @@ traverse_view (type& c) bool versioned (context::versioned (c)); string const& type (class_fq_name (c)); + size_t columns (column_count (c).total); size_t obj_count (c.get<size_t> ("object-count")); os << "// " << class_name (c) << endl @@ -856,8 +857,7 @@ traverse_view (type& c) os << "," << endl << "const schema_version_migration&"; - os << ");" - << endl; + os << ")" << (columns != 0 ? ";\n" : "{}"); } // bind (image_type) @@ -870,8 +870,7 @@ traverse_view (type& c) os << "," << endl << "const schema_version_migration&"; - os << ");" - << endl; + os << ")" << (columns != 0 ? ";\n" : "{}"); // init (view, image) // @@ -884,13 +883,11 @@ traverse_view (type& c) os << "," << endl << "const schema_version_migration&"; - os << ");" - << endl; + os << ")" << (columns != 0 ? ";\n" : "{}"); // column_count // - os << "static const std::size_t column_count = " << - column_count (c).total << "UL;" + os << "static const std::size_t column_count = " << columns << "UL;" << endl; // Statements. |