-
Notifications
You must be signed in to change notification settings - Fork 42
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
Access to relationships.*.data.id #400
Comments
If you have a key defined on your I may be missing some context here. Is |
Oh, interesting! I was just assuming this.organization would be undefined. I will try that. |
In orbitjs#400 @dgeb suggested that even unloaded records should have a type, id, and (if configured) remoteId key when accessed via a relationship that loaded with a `data` property. These tests demonstrate that that works when the related record is already loaded, but fails when it is not.
I got a chance to try this, and it's unreliable. It works if the related record happened to already load via other means. But if the record is not loaded, #403 has a passing test to demonstrate the loaded case and a failing test for the unloaded case. |
Given a server that includes data references for unloaded relationships:
Is there public API for accessing the data.type and data.id from an ember-orbit model?
I was able to work around by creating a getter on my model:
The text was updated successfully, but these errors were encountered: