summaryrefslogtreecommitdiff
path: root/odb/mysql/schema.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-24 16:37:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-24 16:37:09 +0200
commite7892161b62d0f7f2ccf984d163a91025a3ddf78 (patch)
tree53b4ed2934df81071e5cf6b4fb44568bcf487522 /odb/mysql/schema.cxx
parent19ba163feb74def218861b4b3981e713b358d1c8 (diff)
Implement support for many-to-{one,many} inverse relationships
Diffstat (limited to 'odb/mysql/schema.cxx')
-rw-r--r--odb/mysql/schema.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/odb/mysql/schema.cxx b/odb/mysql/schema.cxx
index ce2c350..0a26e65 100644
--- a/odb/mysql/schema.cxx
+++ b/odb/mysql/schema.cxx
@@ -70,6 +70,11 @@ namespace mysql
using semantics::type;
using semantics::data_member;
+ // Ignore inverse containers of object pointers.
+ //
+ if (inverse (m, "value"))
+ return;
+
type& t (m.type ());
container_kind_type ck (container_kind (t));
type& vt (container_vt (t));
@@ -237,6 +242,11 @@ namespace mysql
virtual void
container (semantics::data_member& m)
{
+ // Ignore inverse containers of object pointers.
+ //
+ if (inverse (m, "value"))
+ return;
+
string const& name (table_name (m, table_prefix_));
if (tables_.count (name))