From 7ebcc590a5ca302f35805a025545a8d10ce4cf5f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 23 May 2017 15:12:08 +0200 Subject: Fix bug in handling section members that require growth, part 2 --- odb/relational/source.hxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx index 2eed856..f679366 100644 --- a/odb/relational/source.hxx +++ b/odb/relational/source.hxx @@ -1758,8 +1758,14 @@ namespace relational if (container (mi)) return false; - if (section_ != 0 && *section_ != section (mi.m)) - return false; + // If we have a key prefix (container), then it can't be in a section + // (while mi.m can). The same for top-level -- if we got called, then + // we shouldn't ignore it. (Same logic as in has_grow_member). + // + if (!(!key_prefix_.empty () || top_level_ || + (section_ == 0 && !separate_load (mi.m)) || + (section_ != 0 && *section_ == section (mi.m)))) + return false; // Ignore polymorphic id references; they are not returned by // the select statement. -- cgit v1.1