From 9b9814cda6a159ab7eafd18ac85f57df01c8c762 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Fri, 28 Oct 2011 08:38:41 +0200 Subject: Do not generate image version or change_callback members for abstract objects --- odb/relational/header.hxx | 2 +- odb/relational/oracle/header.cxx | 2 +- 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 -- cgit v1.1