emberjs-addons / sproutcore-datastore

(Ember Only) Repository for the DataStore package
www.sproutcore.com
46 stars 9 forks source link

Queries scoped to remote queries before load fail #7

Closed robmonie closed 13 years ago

robmonie commented 13 years ago

I have a remote query that i'm using as a base query for other queries to scope themselves to for things like further client side filtering and sorting. If I attach the scoped queries after the main query has finished loading, everything works fine. If however, I attach the scoped query before the baseQuery has been loaded, I get "Cannot call method 'forEach' of null" on line 568 of SC.RecordArray - https://github.com/sproutcore/sproutcore-datastore/blob/master/lib/system/record_array.js#L568

I have ways of working around this but it would be simpler if it didn't fail under this scenario.

cheers, rob

robmonie commented 13 years ago

Sorry, I just noticed I duplicated this one.