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 476aad3..392d5f1 100644 --- a/odb/relational/header.cxx +++ b/odb/relational/header.cxx @@ -749,6 +749,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 @@ -826,8 +827,7 @@ traverse_view (type& c) os << "," << endl << "const schema_version_migration&"; - os << ");" - << endl; + os << ")" << (columns != 0 ? ";\n" : "{}"); } // bind (image_type) @@ -840,8 +840,7 @@ traverse_view (type& c) os << "," << endl << "const schema_version_migration&"; - os << ");" - << endl; + os << ")" << (columns != 0 ? ";\n" : "{}"); // init (view, image) // @@ -854,13 +853,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. |