We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When limiting the number of rows in delete query, if the limit change between call, the query should adapt and only delete the good number of items.
When calling the same method with different limit, the limit is taken into account only on first call and then reused between calls.
DB.find(ShoppingCart.class) .where() [...] .setMaxRows(nbProcessed) .delete();
First call with nbProcessed = 20 :
application-akka.actor.default-dispatcher-31 - [info] - service.MaidService - nbProcessed : 20 application-akka.actor.default-dispatcher-31 - [debug] - io.ebean.SQL - txn[] select sc.id from shopping_cart sc where [...] limit 20; --bind(2023-07-22 13:09:10.837) --micros(4�187) application-akka.actor.default-dispatcher-31 - [debug] - io.ebean.SQL - txn[] delete from shopping_cart where id = any(?); -- bind(Array[20]={12032,12035,12042,12044,12057,12059,12060,...}) rows(20) application-akka.actor.default-dispatcher-31 - [info] - service.JobService - cleanOrphanShoppingCart: 20 Rows cleaned
Second call with nbProcessed = 18 :
application-akka.actor.default-dispatcher-32 - [info] - service.MaidService - nbProcessed : 18 application-akka.actor.default-dispatcher-32 - [debug] - io.ebean.SQL - txn[] select sc.id from shopping_cart sc where [...] limit 20; --bind(2023-07-22 13:09:15.76) --micros(3�541) application-akka.actor.default-dispatcher-32 - [debug] - io.ebean.SQL - txn[] delete from shopping_cart where id = any(?); -- bind(Array[20]={12409,12427,12447,12448,12454,12467,12469,...}) rows(20) application-akka.actor.default-dispatcher-32 - [info] - service.JobService - cleanOrphanShoppingCart: 20 Rows cleaned
Yours faithfully, LCDP
The text was updated successfully, but these errors were encountered:
#3183 - Fix for: Wrong limit using setMaxRows on delete between calls
f4ca4ec
Reproduces when the delete needs to perform a select due to caching or cascading of the delete
Merge pull request #3186 from ebean-orm/feature/3183-deleteQueryIn
26fa885
rbygrave
Successfully merging a pull request may close this issue.
Expected behavior
When limiting the number of rows in delete query, if the limit change between call, the query should adapt and only delete the good number of items.
Actual behavior
When calling the same method with different limit, the limit is taken into account only on first call and then reused between calls.
Steps to reproduce
First call with nbProcessed = 20 :
Second call with nbProcessed = 18 :
Yours faithfully,
LCDP
The text was updated successfully, but these errors were encountered: