Quantcast
Viewing all articles
Browse latest Browse all 4826

How to find relationships of any arbitrary ember-data model?

@shunchu wrote:

Is there a way to programmatically determine the relationships of an arbitrary ember-data model?

For example:

# basket
import DS from 'ember-data';
export default DS.Model.extend({
  fruits: DS.hasMany('fruit');
});

Is there an Ember way to get to fruits without knowing the model was basket beforehand?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles