Open nicklee1990 opened 9 years ago
Oh man just spent countless hours figuring out what was wrong with my code.
Having passed so much time since your post, what do you think is the best practice to deal with this?
I honestly can't remember but it's something which needs to be fixed for sure. i'll have a look at fixing it this week if I have time. If I remember correctly, I think moving the all() request before the find() worked for me but not sure?
It happened to my while using findAllBy(), which was dependant of the find(). So swapping was not possible.
For now I'm restarting at first on each repo method. If there's a better way, suggestions are appreciated.
If in a method I do:
The $collection will only contain a single result which matches the ID of the $parseObject. I believe this is because we set a query on the repo in the constructor, but then reuse this same query. We should really be resetting the query for each call which could be done by
Effectively those 2 options are the same thing, just a style difference really. Any other ideas on a fix?