select * from `deployments`
inner join `environments` on `environments`.`id` = `deployments`.`environment_id`
where `environments`.`project_id` = ?
and `uuid` in (?) #difference
and `deployments`.`deleted_at` is null
and `environments`.`deleted_at` is null
after change:
select * from `deployments`
inner join `environments` on `environments`.`id` = `deployments`.`environment_id`
where `environments`.`project_id` = ?
and `deployments`.`uuid` in (?) #difference
and `deployments`.`deleted_at` is null
and `environments`.`deleted_at` is null
This PR makes is possible to use whereUuid on relations where both models have a uuid field.
ex: A
Project
model with aDeployments
hasManyThrough
relation (from: https://laravel.com/docs/8.x/eloquent-relationships#has-many-through)query:
before change:
after change: