Transactions / Bulk Save

#1

I am writing a plugin that performs a bulk update on Pimcore objects.

The issue is that I don’t see how I can perform a bulk save / database transaction using the Pimcore API.

I have tried to manually open a MYSQL transaction using:

\Pimcore\Db::get()->beginTransaction();

The problem is when I eventually call save on the object it fails because it also tries to open a transaction.

Is there any way to batch saves on multiple objects so that a failure of one object to save will cause the whole batch to fail?

Thanks,
Jeremy

#2

Hi,
not that I know of …

BR
Christian

#3

doctrine supports nested transactions, but I am not sure how that affects rollbacks