-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native Custom codec is not used for update #182
Comments
Thank you for reporting. This is a bug. KMongoCodecProvider was an attempt to fix it, but I will commit today a more reliable fix. |
The fix is in the snapshot. Use ObjectMappingConfiguration.addCustomCodec to register a custom codec |
Awesome, thank you very much. Any ETA for a 3.12.2 including the fix? :) |
There will be a new kmongo version when a new version of the mongo java driver will be released. look at https://jira.mongodb.org/projects/JAVA?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page&status=released-unreleased ;) |
Hi, we added a custom codec for java.util.Currency.
But it seems like the codec is not used for updates.
my guess is that in the
fun filterIdToBson
a codecRegistry without my custom codec is used.Or am i registering my codec the wrong way?
I've created a small test here: https://github.com/larslorenzen/kmongo-custom-codec/blob/master/src/test/kotlin/CustomCodecTest.kt
insert
andfind
are working butUpdating
is throwing an error.Expected outcome: all encoding and decoding operations use my custom codec.
Actual outcome: Only some operations use my custom codec
KMongo Version used: 3.12.1
The text was updated successfully, but these errors were encountered: