If I have two objects Project and Task associated with one-to-many relation
Project.hasMany(Task)
var Pro1 = Project.build({...}).save();
Now when I set a new task to one person after saving it
var task = Task.build({ ... }).save().success(function(t1)){
project.setTasks([t1]).success(function() {
// saved!
})
})
the first task works fine, but with the second task I get the following error
TypeError: Cannot read property 'omitNull' of undefined
at {myhome}/node_modules/sequelize/lib/associations/has-many-single-linked.js:21:65
How can add more tasks to the previous, and be able to get them later with
Pro1.getTASKs