Would it make any difference if I do:
@Transactional
public void processData() {
List<MyEntity> entities = ....;
MyEntityRepository.save(entities);
}
vs.
@Transactional
public void processData() {
List<MyEntity> entities = ....;
for (MyEntity entity : entities) {
MyEntityRepository.save(entity);
}
}
What is the difference in terms of the underlying queries and performance?
entities)`, it gives constraint exception. However, if I iterate (i.e the second business method), it doesn't complain. Why is that?– BPm Sep 26 '15 at 12:56