So I would keep my UserStatus collection and add a new embedded
document in the user. Sounds like a solution.
I have tried to use "lastStatus : UserStatus" and "lastStatus :
ObjectId", too. First one did not work (why?) and the second one
stores only the id. I thought it would be more like a reference. Is it
possible to fetch the object behind the ObjectId directly when
accessing the property? It sounded to me like the lazy loading option
in hybernate and that is an awesome feature.
Why is it not possible to store simple objects in mongo? "lastStatus :
Object" results in an error.
Thanks for your help
On 28 Apr., 00:04, Patrick McCoy <
patr...@pjmccoy.com> wrote:
> Consider using an embedded document to store the status of the user.
http://mongoosejs.com/docs/embedded-documents.html