aboutsummaryrefslogtreecommitdiff
path: root/odb/common-query.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-07 16:33:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-07 16:33:47 +0200
commitcebe8e9964267590a80965b98e6f8f1e8bb5059e (patch)
treecba1ea1c127809bd13ecd16d77b11c0cacc876c1 /odb/common-query.cxx
parent7dee57ef9781537f141cc8134690136ea403e217 (diff)
Detect and ignore transient value base
Diffstat (limited to 'odb/common-query.cxx')
-rw-r--r--odb/common-query.cxx26
1 files changed, 15 insertions, 11 deletions
diff --git a/odb/common-query.cxx b/odb/common-query.cxx
index 851854b..25007a0 100644
--- a/odb/common-query.cxx
+++ b/odb/common-query.cxx
@@ -123,23 +123,27 @@ traverse (semantics::class_& c)
{
object_columns_base::traverse (c);
}
- else if (c.get<size_t> ("object-count") != 0) // View.
+ else if (view (c))
{
- view_objects& objs (c.get<view_objects> ("objects"));
-
- for (view_objects::const_iterator i (objs.begin ());
- i < objs.end ();
- ++i)
+ if (c.get<size_t> ("object-count") != 0)
{
- if (i->kind != view_object::object)
- continue; // Skip tables.
+ view_objects& objs (c.get<view_objects> ("objects"));
- if (i->alias.empty ())
- continue;
+ for (view_objects::const_iterator i (objs.begin ());
+ i < objs.end ();
+ ++i)
+ {
+ if (i->kind != view_object::object)
+ continue; // Skip tables.
- generate (i->alias);
+ if (i->alias.empty ())
+ continue;
+
+ generate (i->alias);
+ }
}
}
+ // Otherwise it is a transient base (of a composite value).
if (nl_)
os << endl;