Would it make any difference if I do:
@Transactional public void processData() { List entities = ....; MyEntityRepository.save(entiti
For SpringData Jpa, a cleaner approach will be to use repository.saveAll instead of a forloop with repository.save. saveAll will automatically iterate through the list and save it.
repository.saveAll
for
repository.save
saveAll
saveAll is a part of JpaRepository, so no need to define any method.