I'm stuck and in need of your help.
Assuming I have this context to work with the play framework:
package object mongoContext {
implicit val context = {
val context = new Context {
val name = "global"
override val typeHintStrategy = StringTypeHintStrategy(when = TypeHintFrequency.WhenNecessary, typeHint = "_t")
}
context.registerGlobalKeyOverride(remapThis = "id", toThisInstead = "_id")
context.registerClassLoader(Play.classloader)
context
}
}
How would one lookup dynamically what FieldName id is remapped to on the database side?
Thanks in advance
A field named "id" in your model object will be mapped to "_id" in the database.
As far as looking it up - ? in the Context - call