Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findAll and isLoaded #720

Closed
gregberge opened this issue Feb 11, 2013 · 6 comments
Closed

findAll and isLoaded #720

gregberge opened this issue Feb 11, 2013 · 6 comments

Comments

@gregberge
Copy link

Can any one explain to me why a RecordArray status isLoaded is set to true before even a data is loaded.

From ember-data source code :

all: function(type) {
    var typeMap = this.typeMapFor(type),
        findAllCache = typeMap.findAllCache;

    if (findAllCache) { return findAllCache; }

    var array = DS.RecordArray.create({ type: type, content: Ember.A([]), store: this, isLoaded: true });
    this.registerRecordArray(array, type);

    typeMap.findAllCache = array;
    return array;
  }

isLoaded is not supposed to be triggered when all data are loaded ?

Same problem explained here :
http://stackoverflow.com/questions/14272279/ember-data-recordarray-isloaded-status?s=3f937911-c43c-49b7-a90f-7408a9a8bc6f#new-answer

@bobbus
Copy link
Contributor

bobbus commented Feb 11, 2013

Hi @neoziro ,
This bug is already reported in issue #587

@gregberge
Copy link
Author

Ok ! The main problem is that i can't know when my models are loaded.. Big problem for testing.

@andrewfan
Copy link
Contributor

I think you should use didLoad callback for this purposes

@tchak
Copy link
Member

tchak commented Feb 22, 2013

@bobbus the #587 have nothing to do with this issue
@neoziro please read at my response in #735

@tchak
Copy link
Member

tchak commented Feb 22, 2013

@neoziro this is definitely a problem (at last at a documentation and maybe api design level), we need to push forward a discussion about it. Please close this issue in favor of #735 so we can continue discussion in one place

@wagenet
Copy link
Member

wagenet commented Feb 23, 2013

Closing in favor of #735.

@wagenet wagenet closed this as completed Feb 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants