Replies: 1 comment
-
It's probably fine. If things get weird just remember it's there so you can investigate it. HashMapCodec relies on MapCodec from the driver which is constructed oddly. I'll probably just write a new codec for it just to be safe. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@evanchooly thank you for the quick response and fix for #2577! I have a follow-up question about it.
Before you released the fix in 2.4.6, I got the problem solved with a custom
HashMapCodec
that gets initialized using a different provider and propagates the complete registry with the additional custom codecs. It is overriding the instance installed by MorphiaTypesCodecProvider.Here's the custom codec and provider:
So far, it has worked fine with the models from my projects (even the models with the most unusual design choices), and I'm planning to keep it around, but I wanted to rely on your experience and confirm this is not going to introduce other issues down the line.
Are there any obvious problems that you can think of about using this codec?
Thank you for your hard work keeping Morphia!
** Please complete the following information: **
Server Version: 5.0.21
Driver Version: Java 4.10.2
Morphia Version: 2.4.6
Beta Was this translation helpful? Give feedback.
All reactions