/** * @return \yii\db\ActiveQuery */ public function getCustomerUserNames() { return $this->hasMany(Customer::className(), ['customer_user_name' => 'customer_user_name'])->viaTable('cart', ['item_id' => 'item_id']); }
/** * @return \yii\db\ActiveQuery */ public function getCustomerUserName() { return $this->hasOne(Customer::className(), ['customer_user_name' => 'customer_user_name']); }