Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fjenett opened this issue May 13, 2013 · 3 comments
Closed

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

fjenett opened this issue May 13, 2013 · 3 comments
Assignees

Comments

@fjenett
Copy link

fjenett commented May 13, 2013

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 )

@vendethiel
Copy link

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

@dxg
Copy link
Collaborator

dxg commented May 14, 2013

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

@dxg
Copy link
Collaborator

dxg commented May 16, 2013

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

@dxg dxg closed this as completed May 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants