aboutsummaryrefslogtreecommitdiff
path: root/odb/relational/mssql/source.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-25 09:04:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-25 09:04:35 +0200
commit13102d6772ff32f3bcb53479038e979c5bd9a498 (patch)
tree92f3ceb9ea689072e518d41b6e712852e5f51966 /odb/relational/mssql/source.cxx
parent8d89bf37dd4ef3cb7373e1841ff57a53916fff0d (diff)
Fix auto id handling in polymorphic objects
Diffstat (limited to 'odb/relational/mssql/source.cxx')
-rw-r--r--odb/relational/mssql/source.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/odb/relational/mssql/source.cxx b/odb/relational/mssql/source.cxx
index af43d12..0816466 100644
--- a/odb/relational/mssql/source.cxx
+++ b/odb/relational/mssql/source.cxx
@@ -872,7 +872,10 @@ namespace relational
{
semantics::data_member* id (id_member (c));
- if (id == 0 || !auto_ (*id))
+ type* poly_root (polymorphic (c));
+ bool poly_derived (poly_root != 0 && poly_root != &c);
+
+ if (id == 0 || poly_derived || !auto_ (*id))
return;
// If we are a derived type in a polymorphic hierarchy, then