From 31995832803d21aad266258d5cc1022bc086c2b7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Jun 2012 09:32:09 +0200 Subject: Allocate container traits lazily and only when their definition is seen This fixes a problem with polymorphic hierarchies spread over multiple files in which case the source code for the derived class does not have the definition of the container traits for the base class. See the comment in the source code for further details. --- odb/sqlite/polymorphic-object-statements.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'odb/sqlite/polymorphic-object-statements.hxx') diff --git a/odb/sqlite/polymorphic-object-statements.hxx b/odb/sqlite/polymorphic-object-statements.hxx index 1212176..54319ee 100644 --- a/odb/sqlite/polymorphic-object-statements.hxx +++ b/odb/sqlite/polymorphic-object-statements.hxx @@ -363,7 +363,7 @@ namespace odb container_statement_cache_type& container_statment_cache () { - return container_statement_cache_; + return container_statement_cache_.get (conn_); } public: @@ -395,7 +395,8 @@ namespace odb root_statements_type& root_statements_; base_statements_type& base_statements_; - container_statement_cache_type container_statement_cache_; + container_statement_cache_ptr + container_statement_cache_; image_type image_; -- cgit v1.1