You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Api addition request Model.create( objectOrArr, cb ) #159
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:
Activity
vendethiel commentedon May 13, 2013
I agree, it surprised me when I discovered the project.
dxg commentedon May 14, 2013
Likewise, I'll fix this tomorrow night unless @dresende beats me to it.
Allow passing a single object to Model.create.
dxg commentedon 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