Issue
I have a feeling that
org.springframework.data.mongodb.repository.MongoRepository#saveAll
/*
* (non-Javadoc)
* @see org.springframework.data.repository.CrudRepository#saveAll(java.lang.Iterable)
*/
@Override
<S extends T> List<S> saveAll(Iterable<S> entities);
is not atomic, is it true? It it possible to saveAll in single batch?
Solution
No, it's not. It saves in batch only "new" documents (checks by id). It saves existing documents (id is in collection) one by one.
Answered By - Capacytron
Answer Checked By - Senaida (JavaFixing Volunteer)