angoose icon indicating copy to clipboard operation
angoose copied to clipboard

angoose returns id for populated object

Open avandijk opened this issue 11 years ago • 0 comments

I retrieve an array of objects including populated reference objects (using find().populate() on server). Now when I call f.e. a instance method for one of the items in the array all my referenced objects will be resolved to their _id?

f.e. this object (userGroup is a mongoose reference field)

User name: "Joe", userGroup: object { _id: 57343543534 name: "public" } etc..

After I call f.e. an instance method on the server User.test() the User object look like this

User name: "Joe", userGroup: 57343543534

etc..

Is this behaviour a bug or is it by design?

thx Arjan

avandijk avatar Apr 11 '14 10:04 avandijk