-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Stable has many promise proxy #4842
Conversation
f60ea22
to
a1b0c41
Compare
} | ||
this.__loadingPromise.set('promise', promise) | ||
} else { | ||
this.__loadingPromise = new PromiseManyArray({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we call PromiseManyArray.create()
or new PromiseManyArray()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either should be fine
tests/unit/promise-proxies-test.js
Outdated
content.reload = () => Ember.RSVP.Promise.resolve(content); | ||
let promise = Ember.RSVP.Promise.resolve(content); | ||
|
||
let array = DS.PromiseManyArray.create({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like above
this.__loadingPromise = null; | ||
} | ||
|
||
get _loadingPromise() { return this.__loadingPromise; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have both _loadingPromise
and __loadingPromise
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to make sure it was readOnly without going through the update method. (So people don't accidentally bypass)
const Person = DS.Model.extend({ | ||
name: DS.attr('string'), | ||
tag: DS.belongsTo('tag', { async: false }) | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding toString
s on these makes debugging a lot nicer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update all of them in a later PR
a1b0c41
to
bf7006d
Compare
bf7006d
to
6c601ce
Compare
each
's whicheach
across relationships.