mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-14 13:25:23 +08:00
Added missing relations to Redis/Elasticsearch test models
This commit is contained in:
@@ -35,6 +35,11 @@ class Customer extends ActiveRecord
|
|||||||
return $this->hasMany(Order::className(), ['customer_id' => 'id'])->orderBy('created_at');
|
return $this->hasMany(Order::className(), ['customer_id' => 'id'])->orderBy('created_at');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getOrdersWithNullFK()
|
||||||
|
{
|
||||||
|
return $this->hasMany(OrderWithNullFK::className(), ['customer_id' => 'id'])->orderBy('created_at');
|
||||||
|
}
|
||||||
|
|
||||||
public function afterSave($insert)
|
public function afterSave($insert)
|
||||||
{
|
{
|
||||||
ActiveRecordTest::$afterSaveInsert = $insert;
|
ActiveRecordTest::$afterSaveInsert = $insert;
|
||||||
|
|||||||
@@ -27,6 +27,14 @@ class Customer extends ActiveRecord
|
|||||||
return $this->hasMany(Order::className(), ['customer_id' => 'id']);
|
return $this->hasMany(Order::className(), ['customer_id' => 'id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \yii\redis\ActiveQuery
|
||||||
|
*/
|
||||||
|
public function getOrdersWithNullFK()
|
||||||
|
{
|
||||||
|
return $this->hasMany(OrderWithNullFK::className(), ['customer_id' => 'id']);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user