A partire dalla versione 2.0.0 devi racchiudere la clausola where in una proprietà where:
Project.update( { title: 'a very different title now' }, { where: { _id: 1 } } ) .success(result => handleResult(result) ) .error(err => handleError(err) )
Aggiornamento 2016-03-09
La versione più recente non usa più success ed error, ma al loro posto utilizza promise then-able. Il codice sopra diventa quindi:
Project.update( { title: 'a very different title now' }, { where: { _id: 1 } } ) .then(result => handleResult(result) ) .catch(err => handleError(err) )
Usando async/await
try { const result = await Project.update( { title: 'a very different title now' }, { where: { _id: 1 } } ) handleResult(result) } catch (err) { handleError(err) }