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/oracle/header.cxx | 2 +- odb/relational/oracle/source.cxx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'odb/relational/oracle') 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