How to use the @ember-data/store/-private.typeForRelationshipMeta function in @ember-data/store

To help you get started, we’ve selected a few @ember-data/store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emberjs / data / packages / model / addon / -private / system / relationships / ext.js View on Github external
this.eachComputedProperty((name, meta) => {
    if (meta.isRelationship) {
      meta.key = name;
      let modelName = typeForRelationshipMeta(meta);

      assert(`You specified a hasMany (${meta.type}) on ${parentModelName} but ${meta.type} was not found.`, modelName);

      if (!types.includes(modelName)) {
        assert(`Trying to sideload ${name} on ${this.toString()} but the type doesn't exist.`, !!modelName);
        types.push(modelName);
      }
    }
  });