fixed too restrictive generateCorrelation attribute fields

pull/762/head
iglocska 2015-11-20 01:21:44 +01:00
parent ec566d6225
commit 3cc3b4f34d
1 changed files with 2 additions and 2 deletions

View File

@ -1497,9 +1497,9 @@ class Attribute extends AppModel {
public function generateCorrelation() {
$this->Correlation = ClassRegistry::init('Correlation');
$this->Correlation->deleteAll(array(), false);
$fields = array('Attribute.id', 'Attribute.type', 'Attribute.value1', 'Attribute.value2');
//$fields = array('Attribute.id', 'Attribute.type', 'Attribute.value1', 'Attribute.value2', 'Attribute.event_id');
// get all attributes..
$attributes = $this->find('all', array('recursive' => -1, 'fields' => $fields));
$attributes = $this->find('all', array('recursive' => -1));
// for all attributes..
foreach ($attributes as $k => $attribute) {
$this->__afterSaveCorrelation($attribute['Attribute']);