-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Given a server that includes data references for unloaded relationships:
{
relationships: {
organization: {
data: { type: "organizations", id: "2" },
links: { related: "https://example.com/org/2" }
}
}
}
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:
get organizationId() {
let { type, id } = this.$getData().relationships.organization.data;
return this.$store.keyMap.idToKey(type, 'remoteId', id);
}
Metadata
Metadata
Assignees
Labels
No labels