diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-09 20:19:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-09 20:19:17 +0200 |
commit | 9072761e0c9486cc3d1265a1c1e2b39db8e68bf7 (patch) | |
tree | 1e284d8088e51a962bd285b02f8096ed088463ee /odb/relational/source.hxx | |
parent | dfba83f1ef3b5856d36dc29da0b6e02f51bc36b3 (diff) |
Make sure we can use same type as both container and simple value
Diffstat (limited to 'odb/relational/source.hxx')
-rw-r--r-- | odb/relational/source.hxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx index cabb5c5..7961636 100644 --- a/odb/relational/source.hxx +++ b/odb/relational/source.hxx @@ -107,7 +107,7 @@ namespace relational { semantics::class_* c (object_pointer (utype (m))); - if (container_wrapper (utype (*im))) + if (container (*im)) { // This container is a direct member of the class so the table // prefix is just the class table name. We don't assign join @@ -425,7 +425,7 @@ namespace relational if (semantics::data_member* im = inverse (m)) { - if (container_wrapper (utype (*im))) + if (container (*im)) { // This container is a direct member of the class so the table // prefix is just the class table name. @@ -937,7 +937,7 @@ namespace relational string inv_id; // Other id column. string inv_fid; // Other foreign id column (ref to us). - if (container_wrapper (utype (*im))) + if (container (*im)) { // many(i)-to-many // @@ -3820,12 +3820,11 @@ namespace relational // some sanity checks while at it. // semantics::class_* c (0); - semantics::type& t (utype (m)); - if (semantics::type* cont = container_wrapper (t)) + if (semantics::type* cont = container (m)) c = object_pointer (container_vt (*cont)); else - c = object_pointer (t); + c = object_pointer (utype (m)); view_object const* vo (0); @@ -3909,9 +3908,7 @@ namespace relational // data_member* im (inverse (m)); - semantics::type* cont ( - container_wrapper ( - utype (im != 0 ? *im : m))); + semantics::type* cont (container (im != 0 ? *im : m)); // Container table. // |