Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyFrom to resolved relation metadata #3441

Closed
2 tasks
bajtos opened this issue Jul 26, 2019 · 0 comments · Fixed by #3726
Closed
2 tasks

Add keyFrom to resolved relation metadata #3441

bajtos opened this issue Jul 26, 2019 · 0 comments · Fixed by #3726
Assignees
Labels
feature Relations Model relations (has many, etc.) Repository Issues related to @loopback/repository package

Comments

@bajtos
Copy link
Member

bajtos commented Jul 26, 2019

Add keyFrom to HasOne/HasMany resolved metadata. This enables a more generic implementation of inclusion resolvers, because we can use keyFrom instead of having to find out what is the name of the primary key (which I found difficult to implement inside inclusion resolvers because of TypeScript limitations).

See #3387 and a624d970 in particular

Acceptance criteria

Implementation + test coverage, please create new unit test files to test metadata resolution in an isolated way.

  • HasMany
  • HasOne

(BelongsTo already has keyFrom in the metadata.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Relations Model relations (has many, etc.) Repository Issues related to @loopback/repository package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants