aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-23 15:12:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-23 15:12:08 +0200
commit7ebcc590a5ca302f35805a025545a8d10ce4cf5f (patch)
tree37e634571e839ea86742ef5b06133b9dc3aab794
parent277bf3f0e9be25e3d801ee98dd4dcc5fbd154b6f (diff)
Fix bug in handling section members that require growth, part 2
-rw-r--r--odb/relational/source.hxx10
1 files 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.