-
Notifications
You must be signed in to change notification settings - Fork 383
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
Prepared statement contains too many placeholders #946
Comments
Are you able to include the rest of the stack trace for some more context? At least the lines before it reaches your app. |
updated the post with the data requested |
Thanks, are you able to confirm how many audit entries for this model you have? |
afraid I don't know how to query the 'auditable_type' column since doing like below doesn't result with anything SELECT count(id) FROM `audits` WHERE `auditable_id` = 4 and `auditable_type` =\ 'App\Models\TheModel'; and this fails: SELECT count(id) FROM `audits` WHERE `auditable_id` = 4 and `auditable_type` = App\Models\TheModel; |
EDIT: it was 74k records, I manually pruned it instead as I remember you can just use LIKE to filter using auditable_type. However, I still hope that the package can handle more records when it's deleting them automatically. |
Interesting, I'll leave it for @erikn69 to investigate the specifics. The SQL needs a double slash so SELECT count(id) FROM `audits` WHERE `auditable_id` = 4 AND `auditable_type` = 'App\\Models\\TheModel' |
thank you for that! also, I set it as 'threshold' => 2500, in the config |
In my opinion this was already solved in later versions, I removed the
Sorry, I can't do it at all Also, take some time to review the code, I have noticed that you have not caught up yet |
aye, looks like that version does fix that problem. thanks! |
@erikn69 thanks for confirming, I only tagged you because I knew you had been in that part of the code very recently and would know what the issue was straight away 🙏 |
PHP Version
8.1.28
Laravel Version
10.39.0
Package Version
13.6.4
Description
Audit is triggering a delete and in doing so logs with the error below. Yes, there is a lot of IDs sent to it for the IN condition
Steps To Reproduce
not sure what triggers the delete
Possible Solutions
No response
The text was updated successfully, but these errors were encountered: