public function getOrders() { return $this->hasMany(Order::className(), ['id' => 'order_id'])->via('orderItems'); }
public function getOrder() { return $this->hasOne(Order::className(), ['id' => 'order_id']); }
public function getOrders2() { return $this->hasMany(Order::className(), ['customer_id' => 'id'])->inverseOf('customer2')->orderBy('id'); }