We now render field and local variable references correctly when using the $filter aggregation operator.
Prior to this commit field references had been rendered with an additional $ prefix.
Original pull request: #776.
This allows to obtain the raw Json representation of the query for eg. debug usage.
We also updated the toString method to return a full Mongo Shell compatible representation of the query including projections, order, skip and limit.
Original pull request: #774.
We now support Date to Long, Date to ObjectId, Script to String and other conversions for both reading and writing scenarios.
Original pull request: #773.
ErrorHandlers associated with a CursorReadingTask (Change Streams, imperative Tailable Cursors) now handle exceptions raised by the listener callback.
Exceptions are now catched and the callback continues with the next message.
MongoTemplate.stream(…), MongoTemplate.query(…) and ReactiveMongoTemplate.query(…) now no longer fail when used with BSON Document.class.
Previously, field mapping failed because it required an entity type. Now we gracefully back off when find methods are used with a simple Document entity type.
Add Nullable annotation to nullable method args. Remove IV from JSON Schema as it is not listed in Mongo specs.
Tweak wording in docs. Parse encryption-settings-ref for MongoClientOptions. Add support for KeyId's in encrypted JSON schema properties.
Original pull request: #766.
We now support encrypted fields via MongoJsonSchema and allow XML configuration of com.mongodb.AutoEncryptionSettings via a dedicated factory bean.
Original pull request: #766.
The $hint operator is deprecated since MongoDB 3.2 so we're now deprecating Query.withHint() accepting a String as the String is expected to be a valid document. Therefore, we're introducing withHint(Document) to accept a type-safe representation of query hints.
Reduce AtTest(expected = …) and ExpectedException with the corresponding AssertJ assertThatExceptionOfType(…) and assertThatIllegalArgumentException().isThrownBy(…).
We now configure resolved text-indexes with a simple collation when the text index is created in a collection that uses a non-simple collation.
This explicit setting is required by MongoDB to properly create a text index.
Previously, index creation failed.
This fix allows using alike on nested properties.
new Criteria("nested").alike(Example.of(probe, matching().withIgnorePaths("_class"))));
Switch tests to AssertJ.
Original pull request: #771.
We now offer a fluent API for more intuitive change stream interaction.
Flux<ChangeStreamEvent<User>> flux = reactiveTemplate.changeStream(User.class)
.watchCollection("people")
.filter(where("age").gte(38))
.listen();
Original pull request: #751.
Tweak Javadoc. Simplify Fields creation from Stream. Remove final modifier from private static method. Iterate with loop over PersistentEntity.
Original pull request: #748.
Use the mapping context to get the required fields or fall back to property descriptors if no mapping context is available.
Original pull request: #748.