emberjs/data — pull request #348 by joliss (2012-07-31 20:17:58+00:00)
Title: Do not sideloads records twice

Only one of the two `sideloadAssociations` calls was guarded with
loaded[prop]. This could lead to records being sideloaded twice. E.g. if A
hasMany B, then sideload would load first A (which loads B and then
itself), and then load B. Now the guarding happens at the beginning of
sideloadAssociations, so this cannot happen anymore.

I haven't been able to write a concise test for this bug. I figure it's
better to keep the test suite readable, so I'm submitting this without a
test. It's been verified with copious console.log statements and my own
application models though.