| Module: | @ember-data/model |
|---|
Defined in ../packages/model/addon/-private/model.js:1254
For a given relationship name, returns the model type of the relationship.
For example, if you define a model like this:
app/models/post.jsimport Model, { hasMany } from '@ember-data/model';
export default class PostModel extends Model {
@hasmany('comment') comments;
} Calling store.modelFor('post').typeForRelationship('comments', store) will return Comment.
© 2022 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember-data/4.9/functions/Model/typeForRelationship