transfer_to_new_table
This commit is contained in:
@ -86,7 +86,7 @@ class Company extends \yii\db\ActiveRecord
|
||||
*/
|
||||
public function getFieldsValues()
|
||||
{
|
||||
return $this->hasMany(FieldsValue::className(), ['company_id' => 'id']);
|
||||
return $this->hasMany(FieldsValueNew::class, ['item_id' => 'id'])->where(['item_type' => FieldsValueNew::TYPE_COMPANY])->with('field');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -84,7 +84,7 @@ class Project extends \yii\db\ActiveRecord
|
||||
*/
|
||||
public function getFieldsValues()
|
||||
{
|
||||
return $this->hasMany(FieldsValue::class, ['project_id' => 'id']);
|
||||
return $this->hasMany(FieldsValueNew::class, ['item_id' => 'id'])->where(['item_type' => FieldsValueNew::TYPE_PROJECT])->with('field');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,7 +98,7 @@ class UserCard extends \yii\db\ActiveRecord
|
||||
*/
|
||||
public function getFieldsValues()
|
||||
{
|
||||
return $this->hasMany(FieldsValue::class, ['card_id' => 'id']);
|
||||
return $this->hasMany(FieldsValueNew::class, ['item_id' => 'id'])->where(['item_type' => FieldsValueNew::TYPE_PROFILE])->with('field');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user