diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-22 12:28:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-22 12:29:42 +0200 |
commit | 88d2a5bf72dc8dabce16428ab8c6d37df5dd6cce (patch) | |
tree | 2e85e52d8650de386239dfba2b2494b9fa8b85fa | |
parent | de7d733d27c13c482f06b23a5770f0d7657cb04b (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/sqlite/object-result.txx | 4 | ||||
-rw-r--r-- | odb/sqlite/object-statements.txx | 2 | ||||
-rw-r--r-- | odb/sqlite/view-result.txx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/odb/sqlite/object-result.txx b/odb/sqlite/object-result.txx index c2d06ce..a6b4e50 100644 --- a/odb/sqlite/object-result.txx +++ b/odb/sqlite/object-result.txx @@ -50,7 +50,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). @@ -197,7 +197,7 @@ namespace odb odb::database& db (this->database ()); object_traits::callback (db, obj, callback_event::pre_load); - object_traits::init (obj, im, db); + object_traits::init (obj, im, &db); object_traits::callback (db, obj, callback_event::post_load); } diff --git a/odb/sqlite/object-statements.txx b/odb/sqlite/object-statements.txx index 9ef6043..a880ceb 100644 --- a/odb/sqlite/object-statements.txx +++ b/odb/sqlite/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/sqlite/view-result.txx b/odb/sqlite/view-result.txx index b7ec7ae..c240add 100644 --- a/odb/sqlite/view-result.txx +++ b/odb/sqlite/view-result.txx @@ -65,7 +65,7 @@ namespace odb odb::database& db (this->database ()); view_traits::callback (db, view, callback_event::pre_load); - view_traits::init (view, im, db); + view_traits::init (view, im, &db); view_traits::callback (db, view, callback_event::post_load); } |