diff options
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. |