Is there a way to tell MongoRepository to implement $addToSet when updating an array value during PATCH request?
I am using Spring data rest with HATEOAS and Mongodb, and the current implementation replaces the old array with the new array, where the desired functionality is to perform a union of both arrays and have that array stored in the Mongodb document.
While it should be possible to do that with custom implementation, Spring won't generate a rest url for the implementation and hence would require a lot of boilerplate for a rather small requirement. All responses appreciated.