protected function doAutoCommitFlushTransaction(ResourceInterface $resource, $autoCommit, $skipped = false)
    {
        $hasFlushError = $resource->getErrors()->count() > 0;

        if ($autoCommit && !$skipped && !$hasFlushError) {
            $rErrors = $this->flushTransaction($resource->getRealData());
            $resource->getErrors()->addAll($rErrors);
            $hasFlushError = $rErrors->count() > 0;
        }

        return $hasFlushError;
    }