Skip to content

Conversation

@patrickomeara
Copy link
Contributor

This PR uses the null safe operator <=> instead of = to return results with a null polymorphic relationship as well as those not related with a polymorphic relationship. When this method was first introduced in #42264 (by me) null polymorphic relationships were ignored by whereNotMorphedTo and orWhereNotMorphedTo. This was on oversight on my behalf.

Thanks to @yngc0der for pointing this out.

For anyone using whereNotMorphedTo with nullable polymorphic relationships, you were getting incorrect results, here is the fix.

* use the null safe operator to return null polymorphic relationships
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants