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
feat: restrict instance methods if no primary key #15108
feat: restrict instance methods if no primary key #15108
Conversation
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.
You actually discovered another issues related to PKs. They're closely related but not fully the same. Ok with fixing both in this PR? :)
@ephys I would love to do it! Thanks for the review lemme get this resolved! |
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.
Few comments about the tests. There might be valid answers but this is what I noticed
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.
There are failing tests related to upsert in the suite, I'll take a look when I can to see what it is about
Alright for some reason the |
Regarding the failing tests: Unit TestsRestore TestThe How to fix it:
The Upsert testsI think In the meantime, instead of calling Integration Tests
|
Thanks for the review @ephys I have updated the PR, I don't know if that's exactly what you mentioned, seems like its gonna take me some time understanding the code and the way the repo works haha! |
@ephys ping |
Thank you @ephys |
@ephys I'll get onto this post this week. Actually just got a lot work. |
Take your time, I took a month to get back to this 😅 |
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 to me. Not the biggest fan of how rejectedWith
does not check if you've included the entire error message but that's not a big issue. The error messages we're testing for in this PR are specific enough
I don't mind personally, my goal using |
Yeah, that goal is being fulfilled so we're all good |
Hey @ephys I got it now, do you think it is good to go? |
unless you see anything else, I think it's ready |
Awesome @ephys I don't really notice anything aside the TODOs which I think I can take on in other PRs! |
@WikiRik I'm doing the merge (for the breaking changes commit message) |
Pull Request Checklist
Description Of Change
Instance methods such as
save
,update
, and others will now throw an error if noprimaryKey
was passed by the user.Closes: #14402
Closes #15113
Todo
save
andupdate
are failing.