aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/mssql/no-id-object-statements.txx4
-rw-r--r--odb/mssql/simple-object-statements.txx8
2 files changed, 9 insertions, 3 deletions
diff --git a/odb/mssql/no-id-object-statements.txx b/odb/mssql/no-id-object-statements.txx
index 65dc8e9..7826f21 100644
--- a/odb/mssql/no-id-object-statements.txx
+++ b/odb/mssql/no-id-object-statements.txx
@@ -25,10 +25,12 @@ namespace odb
sizeof (image_type),
status_)
{
- image_[0].version = 0;
+ image_[0].version = 0; // Only version in the first element used.
select_image_version_ = 0;
insert_image_version_ = 0;
+ // SELECT statements only use the first element (no batches).
+ //
select_image_binding_.change_callback = image_[0].change_callback ();
std::memset (insert_image_bind_, 0, sizeof (insert_image_bind_));
diff --git a/odb/mssql/simple-object-statements.txx b/odb/mssql/simple-object-statements.txx
index 1cdffb2..6e3cf42 100644
--- a/odb/mssql/simple-object-statements.txx
+++ b/odb/mssql/simple-object-statements.txx
@@ -66,8 +66,10 @@ namespace odb
sizeof (images),
status_)
{
- images_[0].obj.version = 0; // @@ TODO [0]
- images_[0].id.version = 0; // @@ TODO
+ // Only versions in the first element used.
+ //
+ images_[0].obj.version = 0;
+ images_[0].id.version = 0;
select_image_version_ = 0;
insert_image_version_ = 0;
@@ -75,6 +77,8 @@ namespace odb
update_id_image_version_ = 0;
id_image_version_ = 0;
+ // SELECT statements only use the first element (no batches).
+ //
select_image_binding_.change_callback =
images_[0].obj.change_callback ();