Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.7.2, 1.8.0
-
None
Description
I see a common pattern appearing in our code that it iterates the list of entities and calls save(S).
I would like to propose another save method to EntityRepository class:
public abstract <S extends T> List<S> save(Iterable<S> entities) { List<S> result = new ArrayList<S>(); if (entities == null) { return result; } for (S entity : entities) { result.add(save(entity)); } return result; }
I don't know what is the impact on transaction - I've not worked with batch yet.