Ir al contenido

Missing Bulk Operation (ARCH4053)

Esta página aún no está disponible en tu idioma.

Key java.orm.missing-bulk-operation · Severity warning · Category orm

Repeating single-row inserts/updates in a loop when a bulk API exists produces needless round-trips. Collapse them into a batch API like saveAll.

for (Product p : newProducts) {
productRepository.save(p); // one insert at a time
}
productRepository.saveAll(newProducts); // single bulk insert

Replace the per-item persist calls in the loop with a bulk operation such as saveAll/insertAll.