hwillson / meteor-stub-collections

Stub out Meteor collections with in-memory local collections.
MIT License
24 stars 17 forks source link

idGeneration option not supported? #10

Closed ttencate closed 7 years ago

ttencate commented 7 years ago

It seems StubCollection changes the ID generation method to always use Mongo-style ObjectIDs. When I print out objects inserted and then retrieved from a StubCollection, they always have _id: { _str: "..." }, even if a string-typed _id was explicitly passed upon insert. We're using Meteor-style string IDs in some our collections (most notably Meteor's built-in Meteor.users collection), so any references to foreign IDs stop working.

Is this a bug or a feature? Is there a workaround? I'm fairly new to Meteor so I might be misunderstanding something...

ttencate commented 7 years ago

Sorry, I might have been mistaken. I was looking at the wrong output. Sorry for the noise.