Closed ncolgrove closed 5 years ago
The joiner won't complete many-to-many polymorphic relation joins on both the join id and the join type. Models with relationships like those in Eloquent documentation:
public function tags() { return $this->morphToMany('App\Tag', 'taggable'); }
result in partial joins like:
select * from "users" inner join "profiles" on "users"."profile_id" = "profiles"."id" inner join "taggables" on "taggables"."taggable_id" = "profiles"."id" inner join "tags" on "taggables"."joiner_tag_stub_id" = "tags"."id"'
Join SQL is missing second type option:
... and "taggable_type" = ?
This would be similar to the morphOne option that exists today:
select * from "users" inner join "profiles" on "users"."profile_id" = "profiles"."id" inner join "companies" on "companies"."morphable_id" = "profiles"."id" and "companies"."morphable_type" = ?
merged, thanks
The joiner won't complete many-to-many polymorphic relation joins on both the join id and the join type. Models with relationships like those in Eloquent documentation:
result in partial joins like:
Join SQL is missing second type option:
This would be similar to the morphOne option that exists today: