1

We had a solution using SQL Server where we were able to use a computed field to essentially map a field value to a friendly name when querying the database only when returning records. We've now moved to DocumentDB in AWS and I'm trying to determine if the MongoDB API can do something similar.

It looks like it is possible to do this if we were using a known type by setting a custom serializer on the property, but the whole point of moving to Mongo was so that we weren't bound by a schema. The datatype of the query is now dynamic I would like the Mongo SDK to do a conversion like

original value: I friendly name: Inpatient

but I can't actually store the friendly name in the database for various reasons. I tried using Projection to do this but none of the aggregations seem to be suited for this purpose. Can this be done using the mongo SDK or do I have to find another way?

jugg1es
  • 1,560
  • 18
  • 33

0 Answers0