Skip to content
This repository has been archived by the owner. It is now read-only.

Method getNewIdentity won't check if identifier decorator is used #294

Closed
mroseboom opened this issue Jun 7, 2017 · 0 comments
Closed

Method getNewIdentity won't check if identifier decorator is used #294

mroseboom opened this issue Jun 7, 2017 · 0 comments

Comments

@mroseboom
Copy link
Contributor

@mroseboom mroseboom commented Jun 7, 2017

Use case

  1. Register repository through the identifier decorator.
  2. Retrieve a list of entities.
  3. Try to remove one entity.
  4. Following error will be thrown: No transport found for '${this.getMeta().fetch('endpoint') || 'default'}'.

Overview of the Issue:
When the method getNewEntity is called, it doesn't check if you used the identifier decorator.

Library Name and Version(s)
6.1.1

Browsers and Operating System
All browsers

Suggest a Fix

/**
   * Get a new instance for entityReference.
   *
   * @return {Entity}
   */
  getNewIdentity() {
    return this.entityManager.getEntity(this.identifier || this.resource);
  }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant