I have some general questions about ReactiveMongo plugin. I have previously used Morphia with Play and we have now migrated to scala and I would like to clarify some things.
1) Is it a good practise to use @References annotations similar to Morphia? e.g. https://github.com/mongodb/morphia/wiki/ReferenceAnnotation For example Morphia saves the following object in the DB and they have lazy_load which retrieves the object if required:
...[additional fields],
"accManager": {
"$ref": "User",
"$id": ObjectId("5603a77e0b6d3849aace3727")
}
...[additional fields]
2) How can I achieve that in ReactiveMongo? Is it possible to do this automatically or should I manually create another field as let's say : referenceName: BSONObjectID or referenceName: String?