From e5f6d58885c6555a576bcc53b82797fdc6f241bf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Nov 2012 18:10:27 +0200 Subject: Ignore polymorphic id reference when generating grow() --- odb/relational/mysql/source.cxx | 6 ++++++ odb/relational/pgsql/source.cxx | 6 ++++++ odb/relational/sqlite/source.cxx | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/odb/relational/mysql/source.cxx b/odb/relational/mysql/source.cxx index 15a4fcf..494abf5 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 6a3d761..23600d0 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 7d29c1e..03467cc 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 (); -- cgit v1.1