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

Add deprecation to relationships without { async: false } #3283

Closed
wants to merge 1 commit into from

Conversation

HeroicEric
Copy link
Member

closes #3220

Adds a deprecation to relationships defined without { async: false } that warns to add { async: false } if you wish for the relationship to remain synchronous.

@HeroicEric HeroicEric force-pushed the async-by-default branch 2 times, most recently from 2b6253b to f5e015a Compare June 10, 2015 21:18
@@ -92,6 +92,10 @@ function belongsTo(modelName, options) {

opts = opts || {};

if (typeof opts.async === 'undefined') {
Ember.deprecate('In the future, relationships will be asynchronous by default. You must set { async: false } if you wish for a relationship remain synchronous.');
Copy link
Member

Choose a reason for hiding this comment

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

Can you add which relationship to the deprecation notice please. This way it will be much more annoying to track down.

Copy link
Member

Choose a reason for hiding this comment

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

Something like model type, relationship key, etc.

@igorT
Copy link
Member

igorT commented Jun 14, 2015

Can you also add async:false to all our internal tests?

@HeroicEric
Copy link
Member Author

just working on updating the tests now. Should be able to get it done today

@HeroicEric
Copy link
Member Author

closed by #3366

@HeroicEric HeroicEric closed this Jun 17, 2015
@HeroicEric HeroicEric deleted the async-by-default branch January 15, 2016 05:27
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.

Make async relationships default
2 participants