From 1634bc70227242f12d917e731508a536c890227e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 Aug 2012 11:51:40 +0200 Subject: Fix potential container statement name conflict --- odb/relational/pgsql/source.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx index d4c67d3..6a3d761 100644 --- a/odb/relational/pgsql/source.cxx +++ b/odb/relational/pgsql/source.cxx @@ -846,8 +846,9 @@ namespace relational if (!object (c_) || (abstract (c_) && !polymorphic (c_))) return; - string scope (scope_ + "::" + flat_prefix_ + public_name (m) + - "_traits"); + + string const& pn (public_name (m)); + string scope (scope_ + "::" + flat_prefix_ + pn + "_traits"); // Statment names. // @@ -855,7 +856,9 @@ namespace relational // Prefix top-object name to avoid conflicts with inherited // member statement names. // - string fn (flat_name (class_fq_name (*top_object) + m.fq_name ())); + string fn ( + flat_name ( + class_fq_name (*top_object) + "_" + flat_prefix_ + pn)); os << "const char " << scope << "::" << endl << "select_all_name[] = " << strlit (fn + "_select_all") << ";" -- cgit v1.1