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

Clear meta data when unloading all records for a type. Fixes #2772 #2956

Merged
merged 1 commit into from
Mar 31, 2015
Merged

Clear meta data when unloading all records for a type. Fixes #2772 #2956

merged 1 commit into from
Mar 31, 2015

Conversation

runspired
Copy link
Contributor

No description provided.

@@ -1073,6 +1073,7 @@ Store = Service.extend({
}

typeMap.findAllCache = null;
this.typeMapFor(type).metadata = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to do Ember.create(null) instead of {} here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed. Are there docs somewhere on Ember.create ? It's not in the website api docs. I'm assuming this is the underlying instantiation method (similar to Ember.set or Ember.get) that get's added to Ember.Object?

@wecc
Copy link
Contributor

wecc commented Mar 30, 2015

Had a brief chat with @bmac about maybe clearing the typeMap for the specified type all together instead of nullifying separate properties (findAllCache, metadata). Thoughts @igorT?

@runspired
Copy link
Contributor Author

@wecc I personally think that makes sense. I'm assuming if desired doing so would involve doing this after unloading the records?

var typeMaps = get(this, 'typeMaps');
var guid = Ember.guidFor(type);
if (typeMaps[guid]) {
    delete typeMaps[guid];
}

@runspired
Copy link
Contributor Author

@wecc also, any idea why the build can't complete? Can't get the tests to run locally, just hangs forever, seems same issue is happening with the CI tests.

@wecc
Copy link
Contributor

wecc commented Mar 30, 2015

@runspired failing build should be fixed on master, can you rebase?

@igorT
Copy link
Member

igorT commented Mar 30, 2015

Thanks for the PR! Can you squash/rebase and I'll or @wecc will merge

@runspired
Copy link
Contributor Author

@igorT @wecc squashed and rebased

igorT added a commit that referenced this pull request Mar 31, 2015
Clear meta data when unloading all records for a type. Fixes #2772
@igorT igorT merged commit e1887fd into emberjs:master Mar 31, 2015
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 this pull request may close these issues.

3 participants