Skip to content

Populate sintax #26

@oyepez003

Description

@oyepez003

Hi guys thanks for this project, it is amazing.

My Question is I can populate a child collection when the parent document has only ObjectId for relation.

Somthing like this:

type User struct {
...
Address bson.ObjectId `bson:"address"`
}

connection.Collection("user").Find(bson.M{"firstName":"Bob"}).Populate("messages")

Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions