Store Enum as DBObject equivalent #1997
Unanswered
arivazhagan-jeganathan
asked this question in
Q&A
Replies: 1 comment 1 reply
-
There isn't currently a way to do that. A vague memory of a configuration that allowed that is dancing at the edges of perception but I can find no trace of it. Probably your best bet to get you going today is to provide a custom codec for that enum type and register that with the driver. If you tweak what Morphia is using, it should be relatively straight forward. You can find an example of that in the driver documentation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Morphia 1.5.3, used toDBObject method to store Enum as an DBObject.
in Morphia 2.2.3 need to retain same functionality.. Is it possible to store Enum to same format as earlier? currently it is getting stored as String always.
Any suggestions please @evanchooly. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions