I'm having trouble accessing a relationship inside the ember templates
- Ember & Ember Data 2.0.0
- ActiveModelAdaptar - via plugin
Ember Store in console, shows that the current item has a relationship that is already computed, but I can't access it from template
Grouped Item Model
export default DS.Model.extend({
group: DS.belongsTo('group', { async : false }),
groupable_id: DS.attr('number'),
groupable_type: DS.attr('string'),
});
Group Model
export default DS.Model.extend({
code: DS.attr('string'),
name: DS.attr('string'),
description: DS.attr('string'),
adyuz_site_id: DS.attr('number'),
extra: DS.attr(),
display_as: DS.attr(),
items: DS.hasMany('groupedItem', { async: false, inverse: 'group' }),
});
JSON
Any suggestions, migration deprecations?
Aucun commentaire:
Enregistrer un commentaire