Skip to content

angoose returns id for populated object #20

Description

@avandijk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions