Greetings thank you for your time,
Scenario: Currently when submitting an object model with enumerated types for serialization into a MongoDB collection the enumerated types are stored by their numeric values. It is possible to store them by their string values through the application of a Convention or individually using BsonRepresentation. However each one of my enumerated types also consists of an instance of CompomentModel.DescriptionAttribute.
Question/Desired Capability: I would like to be able to use the DescriptionAttribute when storing the values of Enumerated Types.
The reason is readability - some of my enumerated types are quite verbose and the Description is the most readable form of representation while the numeric values require an extra level of translation. I could store the Descriptions within my Object Models as a separate property from the enumerated values, but that feels like a workaround.
Is there a means of implementing the behavior using the MongoDB Driver where EnumeratedType's DescriptionAttribute gets serialized and deserialized instead of the numeric or string value?
Cheers,--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/d84411b0-3e97-4d6c-923e-fd4742720a98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.