diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-10-28 08:38:41 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-11-01 13:14:55 +0200 |
commit | 9b9814cda6a159ab7eafd18ac85f57df01c8c762 (patch) | |
tree | 63d37a1a6a281e3abee000dae149e483f6b74990 | |
parent | 25feb0393f8c8a1e9e0e0edf369b10b318a60599 (diff) |
Do not generate image version or change_callback members for abstract objects
-rw-r--r-- | odb/relational/header.hxx | 2 | ||||
-rw-r--r-- | odb/relational/oracle/header.cxx | 2 | ||||
-rw-r--r-- | odb/relational/oracle/source.cxx | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/odb/relational/header.hxx b/odb/relational/header.hxx index 53ff93a..cf09097 100644 --- a/odb/relational/header.hxx +++ b/odb/relational/header.hxx @@ -108,7 +108,7 @@ namespace relational names (c); - if (!composite (c)) + if (!(composite (c) || abstract (c))) os << "std::size_t version;"; image_extra (c); diff --git a/odb/relational/oracle/header.cxx b/odb/relational/oracle/header.cxx index acbefef..cb9dd8a 100644 --- a/odb/relational/oracle/header.cxx +++ b/odb/relational/oracle/header.cxx @@ -23,7 +23,7 @@ namespace relational virtual void image_extra (type& c) { - if (options.generate_query () && !composite (c)) + if (options.generate_query () && !(composite (c) || abstract (c))) os << "oracle::change_callback change_callback;"; } }; diff --git a/odb/relational/oracle/source.cxx b/odb/relational/oracle/source.cxx index 3383b6f..1876c81 100644 --- a/odb/relational/oracle/source.cxx +++ b/odb/relational/oracle/source.cxx @@ -868,9 +868,10 @@ namespace relational virtual void init_image_pre (type& c) { - if (options.generate_query () && !composite (c)) + if (options.generate_query () && !(composite (c) || abstract (c))) os << "if (i.change_callback.callback != 0)" - << "(i.change_callback.callback) (i.change_callback.context);"; + << "(i.change_callback.callback) (i.change_callback.context);" + << endl; } virtual void |