aboutsummaryrefslogtreecommitdiff
path: root/odb/relational
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-08-29 12:06:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-08-29 12:06:46 +0200
commitb6f6e4cbbff4681550b3b163b5d4ab2c3ba44819 (patch)
tree9d1f712ad9b72e74841422eccc08caef039c68b3 /odb/relational
parent6e2325337ff31a3b3c5b2ab2e74352e1765d2daa (diff)
Pass non-const image to clone_image(), copy_image()
This is necessary since some databases need to steal stuff from the original image (e.g., LOB descriptors in Oracle).
Diffstat (limited to 'odb/relational')
-rw-r--r--odb/relational/header.cxx8
-rw-r--r--odb/relational/inline.hxx4
2 files changed, 8 insertions, 4 deletions
diff --git a/odb/relational/header.cxx b/odb/relational/header.cxx
index ddb9635..476aad3 100644
--- a/odb/relational/header.cxx
+++ b/odb/relational/header.cxx
@@ -706,12 +706,16 @@ traverse_object (type& c)
<< "root_image (image_type&);"
<< endl;
+ // Note that the original image is non-const since for some databases
+ // the copy "steals" stuff from the original (e.g., LOB descriptors in
+ // Oracle).
+ //
os << "static image_type*" << endl
- << "clone_image (const image_type&);"
+ << "clone_image (image_type&);"
<< endl;
os << "static void" << endl
- << "copy_image (image_type&, const image_type&);"
+ << "copy_image (image_type&, image_type&);"
<< endl;
os << "static void" << endl
diff --git a/odb/relational/inline.hxx b/odb/relational/inline.hxx
index d1a4393..ed10e09 100644
--- a/odb/relational/inline.hxx
+++ b/odb/relational/inline.hxx
@@ -510,7 +510,7 @@ namespace relational
os << "inline" << endl
<< traits << "::image_type*" << endl
<< traits << "::" << endl
- << "clone_image (const image_type& i)"
+ << "clone_image (image_type& i)"
<< "{";
if (poly_derived)
@@ -528,7 +528,7 @@ namespace relational
//
os << "inline" << endl
<< "void " << traits << "::" << endl
- << "copy_image (image_type& d, const image_type& s)"
+ << "copy_image (image_type& d, image_type& s)"
<< "{";
if (poly_derived)