diff --git a/src/columns/Column.cpp b/src/columns/Column.cpp index 599116e28..a00d4ba4d 100644 --- a/src/columns/Column.cpp +++ b/src/columns/Column.cpp @@ -173,6 +173,9 @@ void Column::uda (std::map & all) std::map ::iterator uda; for (uda = udas.begin (); uda != udas.end (); ++uda) { + if (all.find (uda->first) != all.end ()) + throw format (STRING_UDA_COLLISION, uda->first); + Column* c = Column::uda (uda->first); all[c->_name] = c; } diff --git a/src/en-US.h b/src/en-US.h index 41a0ee016..172d2e6fd 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -687,6 +687,7 @@ #define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection." #define STRING_UDA_TYPE "User defined attributes may only be of type 'string', 'date', 'duration' or 'numeric'." #define STRING_UDA_NUMERIC "The value '{1}' is not a valid numeric value." +#define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted." #define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'." // Feedback