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

[CLEANUP beta] Remove Store deprecations #3532

Merged
merged 1 commit into from
Jul 20, 2015
Merged

Conversation

wecc
Copy link
Contributor

@wecc wecc commented Jul 11, 2015

Contribute to open source, they said.

It'll be fun, they said.

Closes #3223

@wecc
Copy link
Contributor Author

wecc commented Jul 11, 2015

Failing on emberchannel beta, investigating...

@wecc
Copy link
Contributor Author

wecc commented Jul 11, 2015

Ember.isArray is now an alias of Array.isArray from what I can see in emberjs/ember.js#11463

This seem to cause stuff like this to fail:

author.set('posts', store.peekAll('post'));

...because Ember.isArray returns false for RecordArrays (previously it returned true for objects that "appears to be array-like"). That's why some tests fails on Ember beta and canary.

We can use store.peekAll('post').toArray() but maybe there's a better, and public, way to do this?

ping @stefanpenner

// We are passed a query instead of an id.
if (Ember.typeOf(id) === 'object') {
Ember.assert('Calling store.find() with a query object is no longer supported. Use store.query() instead.');
}
Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of keeping asserts for the old store.find usages so people copy and pasting old code get a helpful error message.

@bmac
Copy link
Member

bmac commented Jul 17, 2015

@wecc did you ever make any progress on the Array.isArray stuff?

@wecc
Copy link
Contributor Author

wecc commented Jul 17, 2015

@bmac no, I'm unsure on how to continue

@bmac
Copy link
Member

bmac commented Jul 17, 2015

Lets give Ember Data an internal helper function called isArrayLike that implements the old Ember.isArray behavior?

@wecc
Copy link
Contributor Author

wecc commented Jul 17, 2015

Works for me! I'll get to it.

@wecc
Copy link
Contributor Author

wecc commented Jul 19, 2015

@bmac should be ready to 🚢

bmac added a commit that referenced this pull request Jul 20, 2015
[CLEANUP beta] Remove Store deprecations
@bmac bmac merged commit 90a0011 into emberjs:master Jul 20, 2015
@bmac
Copy link
Member

bmac commented Jul 20, 2015

💃

@igorT
Copy link
Member

igorT commented Jul 25, 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.

None yet

3 participants