diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-06-20 15:51:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-06-20 15:51:05 +0200 |
commit | 39ece65fd176084e7dc1a356dcbcf0f29c3824d0 (patch) | |
tree | adb917486f8ebb80500b235fecbe35135f0498e0 | |
parent | 1987bb62d4b0484519697b345eb681be5cdeb4d5 (diff) |
Fix bug in handling of indexes over object pointers with composite ids
-rw-r--r-- | odb/relational/model.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/odb/relational/model.hxx b/odb/relational/model.hxx index d27cb63..ef21e13 100644 --- a/odb/relational/model.hxx +++ b/odb/relational/model.hxx @@ -457,7 +457,12 @@ namespace relational index::member& im (*j); - if (type* comp = composite_wrapper (utype (*im.path.back ()))) + semantics::type* t (&utype (*im.path.back ())); + + if (semantics::class_* ptr = object_pointer (*t)) + t = &utype (*id_member (*ptr)); + + if (type* comp = composite_wrapper (*t)) { // Composite value. Get the list of the columns. Note that // the column prefix needs to contain all the components. |