Skip to content

Api addition request Model.create( objectOrArr, cb ) #159

Closed

Description

@fjenett

Hey, i keep running into the same problem which takes me forever to find the reason for. What i do is i accidentally pass only one object (not an array with one object) into Model.create() ... the callback has no error but the results variable is empty.

I guess most of the cases people will want to create only one item, so i propose to allow for the API to be:

Model.create( objectOrArray, cb )

Activity

  1. vendethiel commented on May 13, 2013

    @vendethiel

    I agree, it surprised me when I discovered the project.

  2. dxg commented on May 14, 2013

    @dxg
    Collaborator

    Likewise, I'll fix this tomorrow night unless @dresende beats me to it.

  3. ghost assigned on May 15, 2013
  4. dxg commented on May 16, 2013

    @dxg
    Collaborator

    I've merged it to master, please reopen if there are any issues.
    Note that you'll have to set your package.json to #master rather than 2.0.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions