Closed admc closed 11 years ago
So, Comments, Photos, Participants, Admins are all associations on Event, correct?
Fixed in master in b098764ee0a41dca60a49506bc47aff151313eec.
Yes, sorry about the delay, they are all associations, looks like you have it under control!
This bug appears to be back, running geddy 0.11.8 and model 0.4.5, same repro - thoughts?
I thought we had added a test specifically for this scenario. I'll have a look at our tests and make sure what we have covered.
We do have a test for this, that passes in all the SQL adapters: https://github.com/mde/model/blob/master/test/integration/adapters/sql/eager_assn.js#L52
Could you give some more specifics that will help us narrow this down?
Yep, this was broken by the refactor for streaming and MySQL. Fixed (again) in c6946335b6cfbde72891ead2438018eb8d6cbb1b, pushed to NPM, v0.4.6..
Thanks dude!
The more items in the includes array, the more duplicates of all types included in the query. If I have 4 elements in this array, I get 8 comments, when there should only be 2. If I use 1 type in includes, then I get the correct number. Looks like a bug in the loop.
Example
~ geddy.model.Event.first(params.id, {includes: includes}, function(err, event) {