Fix missing alias in soft deletes in oneThrough / manyThrough / morphOne / morphMany #210
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a
hasOneThrough/hasManyThroughrelation, it would not apply an alias to the related table.Instead, it would look for a potential alias of the 'farParent' but I think this is unintentional. It should look for alias in the 'through' relation (it already did that) and the 'related' relation (it does after this change)
Second fix is for #209 and applies missing alias in soft deletes for
morphOne/morphMany.PS, i added a new Like model because I need to test soft deletes. I didn't want to add SoftDeletes to another model because it would mean many existing tests needed to be changed.