Permalink
Browse files

Added id remapping

  • Loading branch information...
1 parent 7969046 commit b7f014fe92f772e5945f93946fd42f90e7695bae @mariussoutier committed Jun 27, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 app/models/SalatContext.scala
@@ -5,10 +5,11 @@ trait SalatContext {
import com.novus.salat._
import play.api.Play
import play.api.Play.current
- val c = new Context {
+ val context = new Context {
val name = "play-salat-context"
}
- c.registerClassLoader(Play.current.classloader)
- c
+ context.registerClassLoader(Play.current.classloader)
+ context.registerGlobalKeyOverride(remapThis = "id", toThisInstead = "_id")
+ context
}
}

0 comments on commit b7f014f

Please sign in to comment.