Skip to content

Custom enum codec #1726

Answered by evanchooly
soundgarddden asked this question in Q&A
Discussion options

You must be logged in to vote

There isn't a Morphia way to do that yet, no. You can register your codecs with the driver itself (using a CodecProvider) but depending on how it's mapped, Morphia might override that. If the codec is for a specific enum type (rather than just "is it an enum?") then I think you should be fine. 2.3 is introducing an experimental way to introduce codecs but that method is primarily built around mapping entities rather than basic types so I'm not sure that would help you much either.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by soundgarddden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants