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...
It seems
StubCollection
changes the ID generation method to always use Mongo-styleObjectID
s. When I print out objects inserted and then retrieved from aStubCollection
, 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-inMeteor.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...