Re: db.save() vs. db.update()

2011-07-08 Thread Claus Guttesen
> If you have any doubt, *always* prefer `db.get()` and `db.save()`. I > kinda regret having agreed to include `db.update()`. If it's causing > confusion I will have to remove it. I changed it to a db.get() and db.save() and it works (using express): app.post('/users/save', function(req, res) {

Re: db.save() vs. db.update()

2011-07-06 Thread francisco treacy
Didn't have a close look, but it seems like a bug in riak-js. Please open an issue at https://github.com/frank06/riak-js/issues If you have any doubt, *always* prefer `db.get()` and `db.save()`. I kinda regret having agreed to include `db.update()`. If it's causing confusion I will have to remove

Re: db.save() vs. db.update()

2011-07-06 Thread Mathias Meyer
Claus, it looks you're mixing up metadata objects with actual data objects when calling update. update does a get/put cycle, where it fetches an object, merges its attributes with the ones you hand over to update() and save the result back. Any change you accidentally pass in the meta object fr