-
-
Notifications
You must be signed in to change notification settings - Fork 11
MorphTo Relation #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MorphTo Relation #107
Conversation
… not know if the database will be properly initialized before define is called
…g correctly handed. Modified MorphTo match method to use new queries since find pushes a where clause onto a query which will cause issues with future queries on the same model.
Codecov Report
@@ Coverage Diff @@
## master #107 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 38 40 +2
Lines 1153 1252 +99
Branches 185 196 +11
=========================================
+ Hits 1153 1252 +99
Continue to review full report at Codecov.
|
…ted data as we don't know if type or id will be nullable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, left a few comments for your consideration 👍
Already merged into #106 |
Type of PR:
Breaking changes:
Details
Implements
MorphTo
relation, building off of the refactor by @kiaking. I have addressed the two discussed fixes that we wanted to add.I have also addressed an issue from the refactor where multiple results from the same related model would be missing their related data as a result of the query constraints carrying forward in the shared queries.
TODO:
Cleanup tests