Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link two buckets #101

Open
donaldinos opened this issue Nov 25, 2011 · 2 comments
Open

Link two buckets #101

donaldinos opened this issue Nov 25, 2011 · 2 comments

Comments

@donaldinos
Copy link

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.

@frank06
Copy link

frank06 commented Nov 26, 2011

Hmm... something we didn't catch on tests? Sorry about that (don't really use links). I will implement a fix on the upcoming version that I'm working on at branch js. For the current master, I'll gladly accept a patch.

@sideshowcoder
Copy link
Contributor

Just came across this and I think this can be closed, since it works "now" (after all it's 2 years old), been trying it while walking through some examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants