This commit enables document reference lookup to use `DocumentReferenceSource` to properly instantiate an entity containig a @DocumentReference `#self` property.
Closes#4484
Original Pull Request: #4486
We now no longer attempt to complete the Observation if the context is not a MongoDB one. For commands that target the admin database and run within a parent observation, we still might have an Observation but that one points to the parent invocation and not the MongoDB one as we do not record commands for the admin database.
Closes#4481
This commit introduces a new AggregationVariable type that is intended to better identify variables within a pipeline to avoid mapping failures caused by invalid field names.
Closes#4070
Original pull request: #4242
This commit makes sure to consider the encrypted annotation on fields that are considered domain type property values, encrypting the entire object if necessary.
Use previous context instead of root for mapping objects within an Inheriting context. This avoids accidental mapping of fields against the root entity after eg. a projection stage.
Add missing tests for AggregationOperationRenderer to ensure intended context propagation.
Original Pull Request: #4459
Use the root AggregationOperationContext in nested ExposedFieldsAggregationOperationContext to properly apply mapping for domain properties that use @Field.
Closes#4443
Original Pull Request: #4459
Instead of reimplementing conversion we now try to delegate to the native MongoDB codec infrastructure using a custom writer that will only capture values without actually pushing values to an output stream.
See #4432
Original pull request: #4439
This commit makes sure to convert already decrypted entries returned by the driver in case the client is configured with encryption settings.
Closes#4432
Original pull request: #4439
Prior to this fix a path that contains numeric values used as position parameters would have been stripped in a way that left out the last digit. This could lead to wrong path resolution if the incorrectly constructed property name accidentally matched an existing one.
Closes: #4426
Original Pull Request: #4427
This commit prevents converters from being used as writing converter causing asymmetric write/read operations.
Closes#4390
Original pull request: #4392
Prior to this change the generated pattern would have matched more entries than it should have. The behavior is now aligned to its counterpart not using the IgnoreCase flag.
Closes#4404
Original pull request: #4412
Register a reading converter that returns null when attempting to read a value of type BsonUndefined.
Prior to this change users faced a ConverterNotFoundException when source documents contained BsonUndefined.
Resolves: #2350