From 63403a8a095ceba0ad9a17e46013a46918726181 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 10 Mar 2011 12:41:33 +0200 Subject: Set context::object in all common traversers --- odb/common.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'odb/common.cxx') diff --git a/odb/common.cxx b/odb/common.cxx index 342f28b..1115565 100644 --- a/odb/common.cxx +++ b/odb/common.cxx @@ -183,13 +183,25 @@ traverse_composite (semantics::data_member& m, void object_columns_base:: traverse (semantics::class_& c) { + bool obj (c.count ("object")); + // Ignore transient bases. // - if (!(c.count ("object") || context::comp_value (c))) + if (!(obj || context::comp_value (c))) return; + semantics::class_* prev; + if (obj) + { + prev = object; + object = &c; + } + inherits (c); names (c); + + if (obj) + object = prev; } void object_columns_base::member:: -- cgit v1.1