When i insert through angular; the _id of the Object is as String type but when i insert directly through Mongo shell; the _id of the Object is as ObjectId().
I am using Windows 7, my package versions are
angular@1.2.2
angular-meteor-data@0.0.6
angular:angular@1.4.7
mongo@1.1.3
mongo-id@1.0.1
meteor@1.1.10
also, while less than favorable i have used a transform function in the past to create a standardized ‘id’ field depending on the format the document in question used
no; i mean you could set a constant for the idGeneration field and reference it whenever you create a new mongo collection, but really in my experience it is best to just use some logic in the transform function and patch _id to a string property (i use id) and then index on that. not ideal and im sure there is a better way…
Now, this is kinda self-defeating because it will enforce mongo ObjectId generation, then force a string into v.id, however i found this to work quite well when you have data coming from several different mongo databases