コード例 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getParent()
 {
     return $this->hasOne(CustomerEntity::className(), ['entity_id' => 'parent_id']);
 }
コード例 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCustomer()
 {
     return $this->hasOne(CustomerEntity::className(), ['entity_id' => 'customer_id']);
 }