{
$attributes = array_merge($this->defaultFieldAttributes, $attributes);
$field = Field::getInstance($attributes);
- $this->_fields[$field->getAttribute('name')] = $field;
+
+ $key = $field->getAttribute('name');
+
+ if (isset($this->_fields[$key])) {
+ $key .= '1';
+ }
+ $this->_fields[$key] = $field;
return $field;
}
{
// We need to know all the columns that will be needed by all the templates
$this->useAllTemplates();
- parent::setSchema($schema);
+ return parent::setSchema($schema);
}
public function useAllTemplates()