You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MongoTemplate currently only allows saving a single object at a time, but allows batch removal and insertion using removeAll and insertAll. It would be good to have a similar feature to save all documents in a collection (as a batch)
Affects: 1.7.2 (Fowler SR2)
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered:
With the introduction of bulk writes across multiple collections in MongoDB 8.0 the door is now open for a saveAll method.
The implementation will have to keep track of inserts / upserts and versioned operations to be able to map generated id values to the actual domain types and raise IntegrityViolationErrors for versioned entities that could not be updated.
To find out about those we'll have to track the number of versions and upserts and check those against the matchedCount of the BulkWriteResult.
Further investigation is needed to see if we can guarantee the behaviour for versioned entities and how the driver is going to support multi collection bulk operations. Right now the only way seems to specify the the command on database level in Document style without proper driver API.
Ajit Pendse opened DATAMONGO-1274 and commented
MongoTemplate currently only allows saving a single object at a time, but allows batch removal and insertion using removeAll and insertAll. It would be good to have a similar feature to save all documents in a collection (as a batch)
Affects: 1.7.2 (Fowler SR2)
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: