-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
MongoId strings not returning. #195
Comments
Does |
No, it behaves the same way that {_id:"58d887874e0ca825443236cf"} is. If the id is not 24 characters, then it works as expected. It's only when there are 24 characters where it fails. |
The problem is in the MongoID package, idStringify added '-' before the id when fetching the document. LINE 64
Meteor Minimongo works fine since it stores the ids with '-' prefix, but not for ground db. |
It seems we should not use the custom strid, we should use MongoID.idStringify instead. |
@Chun-Yang did you ever find a solution for this issue? We encounter the same with id's generated by:
for example an ID:
24 characters it is. If the issue is not resolvable it would be good to throw an error when an unrecognized ID type is sent into find() and findOne() methods. That way you understand as a developer that this is an ID issue and not a synchronization / data issue. |
I have a Ground subscription that contains MongoIDs in string form as the main id. When I do a find, it lists it out, however when I do a find or findOne on the id, it doesn't return anything.
Here's an example of one that fails:
DRAFTS.findOne({_id:"58d887874e0ca825443236cf"})
I suspect that it has something to do with mongo-id package and this function:
MongoID._looksLikeObjectID(id)
I haven't been able track it down at all though.
The text was updated successfully, but these errors were encountered: