Fix missing alias in soft deletes in oneThrough / manyThrough / morphOne / morphMany#210
Merged
luisdalmolin merged 1 commit intokirschbaum-development:masterfrom May 19, 2025
Conversation
Contributor
Author
|
Happy to help with any additional work needed to get this merged. If more tests are necessary let me know. |
Member
|
Great, thanks for the additional tests making sure things work. I'll get this reviewed but I think this change makes sense. |
luisdalmolin
approved these changes
May 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.