Skip to content

Conversation

@ikr
Copy link

@ikr ikr commented Jan 20, 2015

Because of obscure historical reasons, we have an id property in our CouchDB documents. So, when one GET-s such a document with curl, they'll see something like:

{ _id: '811b77f35fca01bae6eb9b8ad67becc4',
  _rev: '1-c70b6027c1d75917cef89710a6ef02f0',
  id: '10001',
  name: 'Sorell Hotel Aarauerhof',
  ratingStars: 3,
  ...}

However, if we get() such a document with cradle, our id value disappears, becoming a non-enumerable property with a value of 811b77f.... That change helps avoiding such a situation.

Ivan Krechetov added 2 commits January 20, 2015 13:51
Because of obscure historical reasons, we have an `id` property in our CouchDB
documents. So, when one GET-s such a document with `curl`, they'll see something
like:

{ _id: '811b77f35fca01bae6eb9b8ad67becc4',
  _rev: '1-c70b6027c1d75917cef89710a6ef02f0',
  id: '10001',
  name: 'Sorell Hotel Aarauerhof',
  ratingStars: 3,
  ...}

However, if we `get()` such a document with cradle, our `id` value disappears,
becoming a non-enumerable property with a value of `811b77f...`. That change
helps avoiding such a situation.
@xeodou
Copy link

xeodou commented Feb 16, 2015

We have same issue here. I don't want id replaced by cradle.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants