Skip to content

Is there a simple way to push objects to a schema that uses an array as it's type #137

Open
@atlanteavila

Description

@atlanteavila

Hello,

I love this library and I've only begun to work with it. I'm in a tight deadline at school and I've been tasked with creating a messaging system in our app. I want my users to be able to send each other messages. Each message will come in as an object and be pushed to the user's messages field which is set to be an array:

var ownerSchema = new mongoose.Schema({ firstName: String, lastName: String, age: Number, location: String, favorite: String, numberOfBreeds: Number, numberOfDogs: Number, messages: [] // <== this is the array I'm trying to push messages to });

I'm trying to figure out how to use your library to accomplish something like this. I appreciate any time you give to answering this question. Thanks!

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