aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/object-statements.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/sqlite/object-statements.hxx')
-rw-r--r--odb/sqlite/object-statements.hxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/odb/sqlite/object-statements.hxx b/odb/sqlite/object-statements.hxx
index 15c848d..53445b8 100644
--- a/odb/sqlite/object-statements.hxx
+++ b/odb/sqlite/object-statements.hxx
@@ -220,6 +220,12 @@ namespace odb
void
update_image_version (std::size_t v) {update_image_version_ = v;}
+ std::size_t
+ update_id_image_version () const { return update_id_image_version_;}
+
+ void
+ update_id_image_version (std::size_t v) {update_id_image_version_ = v;}
+
binding&
update_image_binding () {return update_image_binding_;}
@@ -297,7 +303,6 @@ namespace odb
new (details::shared) update_statement_type (
conn_,
object_traits::update_statement,
- id_image_binding_,
update_image_binding_));
update_->cached (true);
@@ -377,10 +382,13 @@ namespace odb
binding insert_image_binding_;
bind insert_image_bind_[insert_column_count];
- // Update binding. The suffix of the bind array is object id. We
- // do it this way for consistency with other database runtimes.
+ // Update binding. Note that the id suffix is bound to id_image_
+ // below instead of image_ which makes this binding effectively
+ // bound to two images. As a result, we have to track versions
+ // for both of them.
//
std::size_t update_image_version_;
+ std::size_t update_id_image_version_;
binding update_image_binding_;
bind update_image_bind_[update_column_count + id_column_count];