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().
Rename InfiniteStream annotation to Tailable to reflect the related MongoDB approach used for repository query methods returning an infinite stream. InfiniteStream is the high-level concept that is achieved by using tailable cursors.
Original Pull Request: #458
Rename ICULocale to CollationLocale. Introduce interface for ComparisonLevel construction and let ICUComparisonLevel types implement that interface. Make value types immutable where possible. Provide static instances for default comparison level instances.
Replace collation conversion IndexConverters with Collation.from(…).toMongoCollation() converter. Introduce missing generic types. Replace Optional.get() with Optional.map(…).orElse(…).
Update reference documentation.
Original pull request: #459.
We now support collations for collections, indexes, queries, findAndModify, delete, geo, bulk and aggregation operations in both the imperative and reactive implementations on template level.
Collation collation = Collation.of("fr")
.strength(ComparisonLevel.secondary()
.includeCase())
.numericOrderingEnabled()
.alternate(Alternate.shifted().punct())
.forwardDiacriticSort()
.normalizationEnabled();
template.createCollection(Person.class, CollectionOptions.just(collation));
Query query = new Query(Criteria.where("firstName").is("Amél")).collation(collation);
Original pull request: #459.
Introduce MongoCustomConversions extending o.s.d.convert.CustomConversions.
Remove o.s.d.mongo.core.convert.CustomConversions implementation code and utility classes and let it extend MongoCustomConversions. Replace references to o.s.d.m.c.c.CustomConversions with o.s.d.convert.CustomConversions. Adapt tests and MappingMongoConverter to MongoCustomConversions.
Related ticket: DATACMNS-1035.
Add since tag to new method. Set year of inception in copyright header. Add ticket reference to test. Minor code reformatting. Add integration test.
Change query keyword for query-by-example from $sample to $example to prevent accidental collisions.
Remove Mongo 3.4-next build profile due to removed Mongo 3.4 driver snapshots.
Original pull request: #452.
We now support the $sample aggregation pipeline stage via Aggregation to select a random subset of result documents.
TypedAggregation<Employee> agg = Aggregation.newAggregation(Employee.class,
sample(5));
Original pull request: #452.
We log CyclicPropertyReferenceException with its message only and removed the stack trace from the log. The stacktrace points to a verifier location and is not particularly useful in finding the offending code. This change creates consistency over how CyclicPropertyReferenceException is logged.
Original pull request: #397.
Replace Flux/Mono.onErrorResumeWith(…) with Flux/Mono.onErrorMap(…) and turn translateException into a method returning a mapping function instead of a reactive type emitting the mapped exception.
We now consider the property's collection type after bulk-fetching DBRefs before returning the actual result value. The issue got only visible if bulk fetching is possible and constructor creation is used. Setting the property value on through an property accessor works fine because the property accessor checks all values for assignability and potentially converts values to their target type. That's different for constructor creation.
Original Pull Request: #457
Fix documentation for namespace types. Remove unused ReflectiveDBCollectionInvoker. Simplify tests, align bean name to mongoClient. Remove injection of Mongo in favor of injecting MongoTemplate.
Remove throws declaration from AbstractMongoConfiguration.mongoClient(). MongoClient creation does not throw checked exceptions so throwing an Exception is no longer required. Replace Mongo by MongoClient in reference documentation.
Original pull request: #451.
Remove and replace usage of "mongo" by "mongoClient". This involves xsd schema, bean names, constructor and parameter types. This required some API changes as some server commands are no longer directly available through the api, but have to be invoked via runCommand.
Also remove references to outdated API using Credentials and an authentication DB instead of MongoCredentials for authentication.
Updated and removed (unused) tests; Altered documentation.
Original pull request: #451.