POSTS

Spring data mongodb - remove element from array

Remove an element from inside an array.

Solution:

Update update = new Update(); AdditionalProperty additionalProperty = new AdditionalProperty(); additionalProperty.setType("remove additional properties with this type"); update.pull("additionalProperty", additionalProperty); mongoClient.updateFirst(query, update, <collection\_name>);