frank06/riak-js — Issue #101: Link two buckets
Author: donaldinos
Created: 2011-11-25 20:26:36+00:00
State: open

I try this code example for link two buckets:

1. db.get('flights', 'KLM-5034', function(err, flight, meta) {
2. meta.links.push({ bucket: 'airlines', key: 'IBE', tag: 'operated_by' });
3. db.save('flights', 'KLM-5034', flight, meta);
4. })

but i get this error message for line 3

-Length'] = this.data instanceof Buffer ? this.data.length : Buffer.byteLength
^
TypeError: Argument must be a string

When i remove line 2, then this update method works correctly.