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
Support both Meteor.Collection.ObjectID() and the default Meteor ID strings #1
Conversation
This fixes an issue in ngMeteor-collections.js that would cause upserting to fail because of an invalid ObjectID being passed to collection.update() (as first argument).
This fixes an issue in ngMeteor-collections.js that would cause removing to fail because of an invalid ObjectID being passed to collection.remove() (as first argument). Same fix for upserting.
This reverts commit 1fe9f16.
There seems to be two types of ObjectId: - A simple string - Meteor's ObjectId. This commit allows ngMeteor to handle both types.
Merge urigo/ngMeteor v0.2
…r v0.2" This reverts commit 27382bb, as it seems to be causing issues on 0.8.3 and on versions prior to 0.8.2.
… ngMeteor v0.2"" This reverts commit 21e6839.
Thanks @leoetlino ! |
Sorry, seems that this got in the pull request. Should have been separated. Well, I added it because angular-ui's sortable requires jQuery to be loaded before AngularJS. As it isn't possible to change the load order easily with Meteor, the easiest way is to have ngMeteor load jQuery, then we can be sure it is loaded before AngularJS. |
@leoetlino Cool. we are testing your fork on our team and will merge it tomorrow or the day after. |
Actually, I should really thank you for testing it. It works for me, might 2014-08-26 12:47 GMT+02:00 Uri Goldshtein notifications@github.com:
|
$$hashKeys will sometimes cause upserting to fail with the below error: > Error: key $$hashKey must not start with '$'
@leoetlino Good job! we tested it and went through the code. I'm going to merge it now. |
Support both Meteor.Collection.ObjectID() and the default Meteor ID strings
Meteor seems to be using two different formats as the item's ID:
Meteor.Collection.ObjectID()
- this is also what MongoDB uses by default.This pull request simply aims to have ngMeteor support both types, since some projects use
ObjectID()
, and others might use Meteor's default ID strings.