Transactions aren't a bad thing and we probably want to revisit this but
for now I'm disabling it becuase it's broken, as seen in api_v3_ActivityTest.
I think the problem is with the onApiException event not being dispatched
because api4 doesn't go through Kernel->runSafe, so transactions aren't
being rolled back when they should.
* @return bool
*/
public function isTransactional($apiProvider, $apiRequest) {
+ if ($apiRequest['version'] == 4) {
+ return FALSE;
+ }
if ($this->isForceRollback($apiProvider, $apiRequest)) {
return TRUE;
}
* @return bool
*/
public function isForceRollback($apiProvider, $apiRequest) {
+ if ($apiRequest['version'] == 4) {
+ return FALSE;
+ }
// FIXME: When APIv3 uses better parsing, only one check will be needed.
if (isset($apiRequest['params']['options']['force_rollback'])) {
return \CRM_Utils_String::strtobool($apiRequest['params']['options']['force_rollback']);