aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-08-14 11:51:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-08-14 11:51:40 +0200
commit1634bc70227242f12d917e731508a536c890227e (patch)
tree018e26101aca598b29d624cce9d4aaf0eb6c8547
parent999cd4661aa0071689171f95aa9bd35511543277 (diff)
Fix potential container statement name conflict
-rw-r--r--odb/relational/pgsql/source.cxx9
1 files 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") << ";"