aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-02-22 12:28:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-02-22 12:29:42 +0200
commitc073adb85f1f28c0f052530ff58f3ff27d5c5141 (patch)
treed70796eb4148f3609bdee53a6bb782010411ba8c
parent4b214c1ece26d6b0a6f36b9ea795119f89273c0d (diff)
Add support for composite object ids
New pragma id_type (member). New test: common/composite-id. The composite example has also been updated.
-rw-r--r--odb/mysql/object-result.txx4
-rw-r--r--odb/mysql/object-statements.txx2
-rw-r--r--odb/mysql/view-result.txx2
3 files changed, 4 insertions, 4 deletions
diff --git a/odb/mysql/object-result.txx b/odb/mysql/object-result.txx
index 31aafb4..81770c3 100644
--- a/odb/mysql/object-result.txx
+++ b/odb/mysql/object-result.txx
@@ -58,7 +58,7 @@ namespace odb
object_traits::callback (db, obj, callback_event::pre_load);
typename object_traits::image_type& i (statements_.image ());
- object_traits::init (obj, i, db);
+ object_traits::init (obj, i, &db);
// Initialize the id image and binding and load the rest of the object
// (containers, etc).
@@ -239,7 +239,7 @@ namespace odb
odb::database& db (this->database ());
object_traits::callback (db, obj, callback_event::pre_load);
- object_traits::init (obj, statements_.image (), db);
+ object_traits::init (obj, statements_.image (), &db);
object_traits::callback (db, obj, callback_event::post_load);
}
diff --git a/odb/mysql/object-statements.txx b/odb/mysql/object-statements.txx
index f7ceb98..2ad4bc9 100644
--- a/odb/mysql/object-statements.txx
+++ b/odb/mysql/object-statements.txx
@@ -97,7 +97,7 @@ namespace odb
// loads being added to the delayed_ vector. We need to process
// those before we call the post callback.
//
- object_traits::init (*l.obj, image (), db);
+ object_traits::init (*l.obj, image (), &db);
object_traits::load_ (*this, *l.obj); // Load containers, etc.
if (!delayed_.empty ())
diff --git a/odb/mysql/view-result.txx b/odb/mysql/view-result.txx
index c8f964e..6161909 100644
--- a/odb/mysql/view-result.txx
+++ b/odb/mysql/view-result.txx
@@ -39,7 +39,7 @@ namespace odb
odb::database& db (this->database ());
view_traits::callback (db, view, callback_event::pre_load);
- view_traits::init (view, statements_.image (), db);
+ view_traits::init (view, statements_.image (), &db);
view_traits::callback (db, view, callback_event::post_load);
}