Use Lombok's Value annotation for immutable value objects. Use IllegalArgumentException for NonNull validation exceptions. Introduce missing generics. Use static methods where possible. Remove unused WriteConcernResolver. Trim whitespaces, formatting.
Original pull request: #472.
We now make sure to run any query / update object through the Query- / UpdateMapper. This ensures @Field annotations and potential custom conversions get processed correctly for update / remove operations.
Original pull request: #472.
We now explicitly mention mapping/support limitations for API variants like count(Query, String) not having domain type specific information that allows field specific mapping.
Rename TerminatingAggregationOperation.get() to TerminatingAggregationOperation.all() to name methods consistently. Extract collection name retrieval to method. Javadoc, formatting, add generics where required/use diamond syntax where applicable.
Original pull request: #466.
We now provide an alternative API for MongoOperations that allows defining operations in a fluent way. FluentMongoOperations reduces the number of methods and strips down the interface to a minimum while offering a more readable API.
// find all with filter query and projecting return type
template.query(Person.class)
.matching(query(where("firstname").is("luke")))
.as(Jedi.class)
.all();
// insert
template.insert(Person.class)
.inCollection(STAR_WARS)
.one(luke);
// update with filter & upsert
template.update(Person.class)
.apply(new Update().set("firstname", "Han"))
.matching(query(where("id").is("han-solo")))
.upsert();
// remove all matching
template.remove(Jedi.class)
.inCollection(STAR_WARS)
.matching(query(where("name").is("luke")))
.all();
// aggregate
template.aggregateAndReturn(Jedi.class)
.inCollection("star-wars)
.by(newAggregation(project("name")))
.all();
Original pull request: #466.
Adopt to API change from Publisher.subscribe() to Publisher.toProcessor(). Adopt to changed reactor-test groupId. Provide mocks for calls that allowed previously null Publishers.
CollectionOptions is now immutable and returns Optional#empty for values not set. Some minor changes to JavaDoc and required updates for tests involved.
Original Pull Request: #462.
Add ReactiveQueryByExampleExecutor to ReactiveMongoRepository and check by providing tests for the execution invocation.
Move methods into order and add some missing @Override annotations along the way.
Related ticket: DATACMNS-995 via (spring-projects/spring-data-commons#197)
Original Pull Request: #444
We now consistently store the content type of a file in _contentType in the metadata document. On the lookup side we still fall back to the deprecated file.getContentType().