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

refactor: extract helpers resolving relation metadata into own files #3410

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Jul 22, 2019

In #3387 (spike for Inclusion of related models), I found a need to access resolved relation metadata from other files than just the repository factory. At the same time, I'd like to keep resolved metadata internal and don't export it from @loopback/repository, at least for now.

In this pull request, I am adding three new files (belongs-to.helpers.ts, has-many.helpers.ts and has-one.helpers.ts) and moving code related to resolution of relational metadata into these new files.

This pull request is a pure refactoring with no impact on our users.

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@bajtos bajtos added refactor Relations Model relations (has many, etc.) Repository Issues related to @loopback/repository package labels Jul 22, 2019
@bajtos bajtos added this to the July 2019 milestone milestone Jul 22, 2019
@bajtos bajtos self-assigned this Jul 22, 2019
@hacksparrow hacksparrow self-requested a review July 22, 2019 09:35
Copy link
Contributor

@hacksparrow hacksparrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@nabdelgadir nabdelgadir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bajtos bajtos merged commit 60c25a7 into master Jul 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the extract/relation-helpers branch July 22, 2019 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Relations Model relations (has many, etc.) Repository Issues related to @loopback/repository package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants