Update the reference documentation about collection initialization on read, add the required tests to make sure it behaves as expected and simplify BeanUtils value presence check.
Closes#4571
Original pull request: #4574
This commit reduces the API surface of the ReadPreference annotation leaving fine grained control such as Tags to the Template API.
Next to supporting read preference for annotated queries we now also make sure to apply read preferences for annotated aggregation methods as well as predefined finder methods running queries.
See: #2971
Original Pull Request: #4503
The annotation enables a declarative style of defining the ReadPreference to use for individual or all repository queries.
Closes: #2971
Original Pull Request: #4503
Replace duplicate occurrences of _id with FieldName.ID.name(). Shorten property names to avoid repetative "field" wording. Add Javadoc
to MongoField builder.
See #4464
Original pull request: #4512
This commit introduces support for mapping (read/write) fields that contain dots in their name, preserving the name as is instead of considering the dot being a separator within a path of nested objects.
Query and Update functionality remains unaffected which means no automatic rewrite for field names containing paths will NOT take place. It's in the users responsibility to pick the appropriate query/update operator (eg. $expr) to interact with the field.
Closes#4464
Original pull request: #4512
Add assertions and missing Override annotations. Avoid recursive self-call on getClassLoader. Extend documentation.
See #1627
Original pull request: #4389
We now set the skipOutput flag if an annotated Aggregation defines an $out stage and when the method is declared to return no result (void / Mono<Void>, kotlin.Unit)
Closes: #4088
Original pull request: #4341
This commit introduces the new `@Hint` annotation that allows to override MongoDB's default index selection for repository query, update and aggregate operations.
```
@Hint("lastname-idx")
List<Person> findByLastname(String lastname);
@Query(value = "{ 'firstname' : ?0 }", hint="firstname-idx")
List<Person> findByFirstname(String firstname);
```
Closes: #3230
Original pull request: #4339
Remove caching variant of MongoClientEncryption. Rename types for consistent key alt name scheme. Rename annotation to ExplicitEncrypted.
Add package-info. Improve documentation wording. Reduce visibility of KeyId and KeyAltName to package-private.
Original pull request: #4302
See: #4284
We now support explicit field encryption using mapped entities through the `@ExplicitEncrypted` annotation.
class Person {
ObjectId id;
@ExplicitEncrypted(algorithm = AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic, altKeyName = "my-secret-key")
String socialSecurityNumber;
}
Encryption is applied transparently to all mapped entities leveraging the existing converter infrastructure.
Original pull request: #4302Closes: #4284