aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-11-20 18:12:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-11-20 18:12:34 +0200
commit2b7b3e9d9e69bbf0fdd6ce1a8564765027580d10 (patch)
treedc70eb26b97cb2534d41640121f6a9c8d1f1538a /odb
parent7daf0dc185cd4e94ebccbf2e3537a767e10e86b8 (diff)
parente5f6d58885c6555a576bcc53b82797fdc6f241bf (diff)
Merge branch '2.1'
Diffstat (limited to 'odb')
-rw-r--r--odb/relational/mysql/source.cxx6
-rw-r--r--odb/relational/pgsql/source.cxx6
-rw-r--r--odb/relational/sqlite/source.cxx6
3 files changed, 18 insertions, 0 deletions
diff --git a/odb/relational/mysql/source.cxx b/odb/relational/mysql/source.cxx
index a9e7a16..48ae1f2 100644
--- a/odb/relational/mysql/source.cxx
+++ b/odb/relational/mysql/source.cxx
@@ -316,6 +316,12 @@ namespace relational
if (container (mi))
return false;
+ // Ignore polymorphic id references; they are not returned by
+ // the select statement.
+ //
+ if (mi.ptr != 0 && mi.m.count ("polymorphic-ref"))
+ return false;
+
ostringstream ostr;
ostr << "t[" << index_ << "UL]";
e = ostr.str ();
diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx
index 58a2292..332e25b 100644
--- a/odb/relational/pgsql/source.cxx
+++ b/odb/relational/pgsql/source.cxx
@@ -265,6 +265,12 @@ namespace relational
if (container (mi))
return false;
+ // Ignore polymorphic id references; they are not returned by
+ // the select statement.
+ //
+ if (mi.ptr != 0 && mi.m.count ("polymorphic-ref"))
+ return false;
+
ostringstream ostr;
ostr << "t[" << index_ << "UL]";
e = ostr.str ();
diff --git a/odb/relational/sqlite/source.cxx b/odb/relational/sqlite/source.cxx
index 75e7149..731afba 100644
--- a/odb/relational/sqlite/source.cxx
+++ b/odb/relational/sqlite/source.cxx
@@ -93,6 +93,12 @@ namespace relational
if (container (mi))
return false;
+ // Ignore polymorphic id references; they are not returned by
+ // the select statement.
+ //
+ if (mi.ptr != 0 && mi.m.count ("polymorphic-ref"))
+ return false;
+
ostringstream ostr;
ostr << "t[" << index_ << "UL]";
e = ostr.str ();