Open TrueReassembly opened 6 months ago
You can try this:
final MongoClientSettings mongoClientSettings =
MongoClientSettings.builder()
...
other client settings
...
.codecRegistry(
CodecRegistries.fromRegistries(
CodecRegistries.fromCodecs(new YourCodecClass()),
MongoClientSettings.getDefaultCodecRegistry()))
.build();
final Datastore ds = Morphia.createDatastore(MongoClients.create(mongoClientSettings));
Please ask your question and provide whatever background or supporting information you think might be relevant:
I am currently trying to register a codec that I have created for the Bukkit ItemStack class but I cannot figure out how to register it. I have already looked at both MongoDB's and Morphia's documentation but was unable to find anything. Here is my Mongo Registration class
Please complete the following information: Server Version: Unsure, I'm using mongo atlas if that's the question Driver Version: Whichever one comes bundled in morphia Morphia Version: 2.4.11