uk.gov.hmrc.mongo.play.json.formats.MongoFormats
See theMongoFormats companion object
trait MongoFormats
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object MongoFormats
- Self type
Members list
Type members
Value members
Deprecated methods
Maps a Format for an entity with 'id' field to mongo by renaming the id field to internal '_id'. Useful for auto generated Formats, where the model id key is named 'id'.
Maps a Format for an entity with 'id' field to mongo by renaming the id field to internal '_id'. Useful for auto generated Formats, where the model id key is named 'id'.
case class MyObject(id: ObjectId)
val formats: Format[MyObject] = mongoEntity(Json.format[MyObject]}
This is deprecated since an explicit Format, mapping id to _id is preferred. Also any queries on id would still need to use the underlying '_id' name.
Attributes
- Deprecated
- true
Concrete fields
In this article