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

Avoid aliasing id & rev if prop names are already there #281

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 20, 2015

  1. Avoid aliasing id & rev if prop names are already there

    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.
    ikr committed Jan 20, 2015
    Configuration menu
    Copy the full SHA
    adf3d68 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eeb5b51 View commit details
    Browse the repository at this point in the history