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!
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!