balderdashy / waterline-docs

WARNING: The content in this repo is out of date! See https://github.com/balderdashy/sails-docs for the most up-to-date documentation
452 stars 161 forks source link

can't update something self #137

Open shoutleafy opened 7 years ago

shoutleafy commented 7 years ago

hi ,all

how can i update a data add from itself in waterline, in SQL query just like this: " update news_table set count_num = count_num+1 where id = 1; " News_table .update( {id:1}, {count_num :'count_num + 1'} ) .exec(function afterwards(err, updated){ //do something } but not work,how can i write it? tks!