コード例 #1
0
ファイル: Comment.php プロジェクト: jaybril/www.mimgpotea.com
 public function getFindComment()
 {
     return $this->hasOne(OrderDetail::className(), ['id' => 'typeId']);
 }
コード例 #2
0
ファイル: Order.php プロジェクト: jaybril/www.mimgpotea.com
 public function getProductdetail()
 {
     //同样第一个参数指定关联的子表模型类名
     //
     return $this->hasMany(OrderDetail::className(), ['orderId' => 'id']);
 }