From 5b27e12cc00c3faf4f8171d4f41a0ec5d155db48 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Feb 2013 15:50:07 +0200 Subject: Add support for change-tracking containers ODB now supports "smart" ordered containers. Such containers get extra functions for updating and deleting individual elements. Based on this functionality implement two change-tracking containers: odb::vector (equivalent to std::vector) and QOdbList (equivalent to QList). New tests: common/container/change-tracking and qt/common/container/change- tracking. --- odb/relational/inline.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'odb/relational/inline.hxx') diff --git a/odb/relational/inline.hxx b/odb/relational/inline.hxx index 466e348..24e3a08 100644 --- a/odb/relational/inline.hxx +++ b/odb/relational/inline.hxx @@ -305,7 +305,8 @@ namespace relational // erase (object_type) // - if (id != 0 && !poly && optimistic == 0) + if (id != 0 && !poly && optimistic == 0 && + !has_a (c, test_smart_container)) { os << "inline" << endl << "void " << traits << "::" << endl -- cgit v1.1