Details
-
New Feature
-
Resolution: Fixed
-
Minor - P4
-
None
-
None
-
Not Needed
Description
When a MongoClient is created from MongoClientSettings, the MongoClient applies the uuidRepresentation to the codecRegistry, using an internal API. But there are some use cases, e.g. MongoCollection#withCodecRegistry where an application might find it necessary to apply a different representation to a registry.
The driver should an API to CodecRegistries factory class to allow this, e.g.:
/** |
* Apply given {@link UuidRepresentation} to the given {@link CodecRegistry}.
|
*
|
* @param codecRegistry the code registry
|
* @param uuidRepresentation the uuid representation
|
*/
|
public static CodecRegistry withUuidRepresentation(final CodecRegistry codecRegistry, |
final UuidRepresentation uuidRepresentation) |