Is there a better way for referencing at the time of creating collection and derefrencing while querying using mongoskin, e.g.
foo collection
Foo: {
prop1: true,
prop2: true,
bars: [
{
"$ref": "Bar",
"$id": ObjectId("blahblahblah")
}
]
}
bar collection
Bar: {
testprop: true
}
After couple of days i was able to figure out this. Just want to share it.
Here is the collection say user and group and we want to refer group id to user. `function createUser() {
For group service
function groupId(role) {
}