ember-model icon indicating copy to clipboard operation
ember-model copied to clipboard

Add failing tests for Model.find() not returning sideloaded data

Open cjroebuck opened this issue 11 years ago • 6 comments

Failing tests for #314, #247

When sideloading data and subsequently calling find() or find([array of ids]), ember-model will call through to the adapter and try to retrieve data from the server, instead of materializing and returning the sideloaded data instantly.

cjroebuck avatar Mar 01 '14 12:03 cjroebuck

@jnovatnack want to take a stab at this? :)

ebryn avatar Mar 05 '14 15:03 ebryn

Funny enough I noticed this yesterday as well.

jnovatnack avatar Mar 06 '14 14:03 jnovatnack

@jnovatnack you got this?

ebryn avatar Mar 10 '14 21:03 ebryn

Sure, I'll take a shot at it.

On Mon, Mar 10, 2014 at 5:24 PM, Erik Bryn [email protected] wrote:

@jnovatnack https://github.com/jnovatnack you got this?

Reply to this email directly or view it on GitHubhttps://github.com/ebryn/ember-model/pull/315#issuecomment-37236284 .

jnovatnack avatar Mar 11 '14 13:03 jnovatnack

@jnovatnack ping ;)

ebryn avatar Mar 17 '14 02:03 ebryn

Dug into this a bit. Are we sure that if you sideload data with load() then find() should not execute a remote request and only return the side loaded data?

The second test case makes sense to me though since find([single-id]) already returns the sideloaded data.

jnovatnack avatar Mar 18 '14 21:03 jnovatnack