emberjs/data — pull request #1440 by teddyzeenny (2013-10-10 15:20:01+00:00)
Title: Ensure that async hasMany is always a promise

There are cases where an async hasMany would not return a promise (when the CP is not cached but the relationship already exists), and instead returns the `ManyArray` itself. This ensures a promise is always returned even if the relationship exists.

I had to keep track of the relationship's promise so I stored it as a `promise` property on the `ManyArray`. Another way would be to just nuke and rebuild relationships that aren't loaded (based on the `isLoaded` property of the cached relationship).

Let me know what you prefer.