-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[Known Issue] Duplicate conditions on retrying SELECT
calls under createOrFirst()
#48718
Comments
createOrFirst
createOrFirst()
calls
createOrFirst()
callsSELECT
calls under createOrFirst()
If the impact is greater than expected, consider targeting for 11.x. |
I don't understand. Is there a bug here at all? Did you now create a bug issue for a PR you sent in yourself? Can you send in a PR with your suggested fix? |
@driesvints Sorry for the confusion. Actually:
|
@tonysm If you have time, could you please make the fix? Thank you in advance. |
My personal life is quite demanding right now, but I'll try to find an hour or two to dig into this. The issue doesn't seem to be on the I think cloning the query builder (as suggested in the PR as a possible fix) on the first attempt should resolve the issue, but we need more testing. |
Sorry, that's right. Actually #47973 contained the Greatly appreciate for you help. |
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
Laravel Version
10.x (
>10.28.0
<10.29.0
: 4b4b1e4)PHP Version
irrelevant
Database Driver & Version
irrelevant
Description
The known issue in:
firstOrCreate
updateOrCreate
improvement throughcreateOrFirst
+ additional query tests #48637In #48637, although we knew it was a known issue, did not fix it to minimize risk. We will probably clone
Builder
to fix it, but we need to carefully examine the scope of the impact.There is no real harm in the operation, since it only adds useless conditions to the query. Therefore, this is more of a refactoring than a bug fix.
The text was updated successfully, but these errors were encountered: