-
-
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
[3.2.2] Setting an async belongsTo triggers bindings but is not available through get #5555
Comments
I believe this is related to #5562 |
I can confirm that this is fixed in 3.2.1 and 3.3.1: the twiddle was using 3.2.0 |
Edit: The current iteration of this issue may be tied to some special handling of ours, so this may well be a local issue:
|
@miketervela there is an issue with observers which is fixed on master when links are included for relationships. It’ll get backported but hasn’t been yet. Worth checking master. |
@runspired That didn't actually solve my problem - if I get a chance this weekend I'll try creating a small project without anything custom and see if I can recreate |
Another update: 3.40-beta.3 solves my non-async set/oberserves/get issue for hasMany's, but the exact same problem still remains for belongsTo |
twiddle here:
https://ember-twiddle.com/9fd0a5406cd997a692ae5f4d2fb3f613?openFiles=templates.application.hbs%2C
I have a model of type 'dynamic-model' that has an array of native fields and a schema that has its own array of fields. 'dynamic-model' has a computed property to merge the two arrays together. When I call model.set('schema', schema), the computed property fires - but when it calls this.get('schema'), schema is not available.
I can, however, call this.belongsTo('schema').value() and access the newly set schema there.
this.get('schema') worked in 3.1 and earlier versions, as you can verify with the twiddle above.
dynamic-model in the twiddle has two different 'merged' properties - you can see the results of each one by clicking 'Add schema to model' and then click the respective 'View Merged by xxx' button.
You can set and clear the field multiple times to verify the behavior.
The text was updated successfully, but these errors were encountered: