Closed Stalinko closed 1 week ago
Actually I like this behaviour more. So for me it's not a bug, but a feature.
And I'd suggest to update the docs accordingly - so that it says that entire import will be rollbacked even in the case of batch imports.
If you approve this - I can push a PR to the docs.
This bug report has been automatically closed because it has not had recent activity. If this is still an active bug, please comment to reopen. Thank you for your contributions.
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
What version of Laravel Excel are you using?
3.1.44
What version of Laravel are you using?
v8.83.25
What version of PHP are you using?
8.0
Describe your issue
https://docs.laravel-excel.com/3.1/imports/validation.html#database-transactions The docs are saying:
But in fact the entire import is wrapped into a single transaction, thus if there are multiple batches and one of them contains an error then all batches will be rollbacked.
How can the issue be reproduced?
Try to import a file with multiple batches. Some batch should contain a validation error.
None of the batches will be imported in the end.
What should be the expected behaviour?
All batches except the batch with error are imported.