-
Notifications
You must be signed in to change notification settings - Fork 81
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
Inconsistent aliasing of id
#20
Comments
+1 |
Thanks for bringing this up! I'll probably drop the Scott |
Ok so now I remember why I did this. You should be able to access the ID via The alias Thoughts? Still think we should remove the Scott |
I thought it was a good addition at first, but it has to be consistent all the way through. Perhaps it will be better to remove it in favor of consistency with MongoDB. Though, I'm not completely sure. |
I've deprecated the Thanks again! |
* upstream/master: (41 commits) Bumped version, updated CHANGELOG, and updated README Fixed serialization test for MongoDB IDs Deprecated 'id' alias on document object for issue scottwrobinson#20 Removing some inconsistencies with accessing the ID. Partially covers issue scottwrobinson#20 Consolidated hook code so it can be re-used throughout Document methods Moved collectionName method to BaseDocument. Fixes scottwrobinson#26 Added new ValidationError object, fixed some validation tests, fixed min/max validation, and fixed validation for array of embedded documents Fixed issue with running 'canonicalize' tests on travis-ci and bumped version Removed unused harmony-reflect dependency, updated CHANGELOG, and bumped version Updated CHANGELOG, README, and bumped version Removed --harmony-proxies flag from tests now that Proxy isn't used Added sanity check to 'required' tests Updated PR scottwrobinson#19 to conform to new collection naming Changed how you name collections Removed need for Proxy and harmony-reflect dependency Added a required key value validation. Adding .npmignore file Moved jshint settings out of package.json and in to .jshintrc file. Updated .gitignore for .jshintrc Removed custom harmony-reflect script and adding harmony-reflect as dependency Added tests for canonicalizing dates ...
There are some inconsistencies with the
_id
toid
field aliasing.When I perform a load call (e.g.
loadMany
with{}
empty query), camo returns objects with the_id
field aliased toid
:However, when specifying an actual input query to these load calls, I am unable to specify the
id
field, and instead have to specify MongoDB's original_id
field, as using theid
field yields no results at all:In other words, for queries, the
id
field is not aliased back to_id
, which is inconsistent with the load call result behavior, and requires the use of additional workarounds in the application using camo.The text was updated successfully, but these errors were encountered: