Skip to content

Consider showing an example of constructing Model.update in readme. #50

@elipeters

Description

@elipeters

I found the constructor...

1058 Model.update(values, vogelsOptions, function (err, res) { ... });

So values is my table map and I get an error if I don't include my primary key which is odd considering that this is not likely to change. The error is not useful as it is 'undefined'.
ValidationException: Supplied AttributeValue is empty, must contain exactly one of the supported datatypes undefined

...and vogelsOptions would be my search criteria as eg. {where:{id:user.id}}

...eg

User.update(params,{where:{id:req.user.id}}).exec(function(err, res){
  //do something
});

...and yet I'm still not writing to the table. Can anyone show me a working example?

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