-
Notifications
You must be signed in to change notification settings - Fork 37
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
findOne not working on collection #151
Comments
Hi thanks for the super well constructed issue/question! So, I'm a bit stumped, but have a couple of ideas to try. Firstly, file-collection doesn't implement You say that the HTTP support does work though, which sorta makes sense, because file-collection handles that lookup itself. Here's a quick test: When you get a lookup failure, try using the same selector with Another quick test is to see if file-collection has anything to do with it... You should be able to open the Anyway, as I said, stumped, but if you can try the above tests, it should help narrow it down. |
I'm seeing something similar. The record is in the collection but findOne(new Mongo.ObjectID(x)) doesn't always work. |
In my case, it was an error in a publish statement. I realized the .files were not available on the client, so your suggestions above were useful for me. Thx. |
I am seeing a problem with Files-Collection which doesn't make sense.
When I do a findOne, it doesn't always return a record from the database, even though I know it's there.
In this image collection I am keeping 2 copies of each image, one being a full sized mugshot, and a second avatar image. They share the same metadata._mid, and the filename is either "avatar" or "mugshot".
Everything seems ok until I iterate over the data in the client, putting together a list of portrait images with this code:
users is an array of meteor users. By rights it should never log an error (as all the images are in the database), but in fact 9 of the 18 records are logged as not found (evenly distributed between "avatar" and "mugshot").
I do subscribe to the Mugshot collection.
Thinking that perhaps it was something to do with asking for each image individually, I added a helper to basically do a similar thing as above, except the helper asked for this
But the results were the same, which puzzles me. http Image fetching (defined in the collection common code) works perfectly using a similar selector (combination of metadata._mid and filename)
So my question is, have you seen this kind of behavior before, is it a quirk of gridfs, and is there anything that can be done to fix it?
Here is my data:
The text was updated successfully, but these errors were encountered: