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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(repository): add interface for hasManyThrough #4247

Merged

Conversation

KalleV
Copy link
Contributor

@KalleV KalleV commented Dec 3, 2019

Adds interface for the new relation type "hasManyThrough" to support many-to-many model relations.

This PR is a continuation of #2359 and implements the first change described in #2359 (comment).

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 feature Relations Model relations (has many, etc.) Repository Issues related to @loopback/repository package labels Dec 5, 2019
Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Thank you @KalleV for picking up the work on HasManyThrough relation! 馃憦馃コ

In #2359 (comment), we discussed slightly different structure of the relation definition, one that is more ergonomic for consumers. Can you please apply the changes suggested in that thread?

packages/repository/src/relations/relation.types.ts Outdated Show resolved Hide resolved
@KalleV KalleV requested a review from bajtos December 5, 2019 18:46
@KalleV
Copy link
Contributor Author

KalleV commented Dec 10, 2019

Hi @bajtos . Is there any other changes you would like to see to the new interface?

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Almost there!

Could you please squash all commits into a single one and provide a descriptive commit message per our guidelines?

If you are not familiar with git history manipulation, then you can find detailed help in our docs.

@strongloop/sq-lb-apex can one of you take care of this pull request please and get it landed?

packages/repository/src/relations/relation.types.ts Outdated Show resolved Hide resolved
packages/repository/src/relations/relation.types.ts Outdated Show resolved Hide resolved
@bajtos bajtos requested a review from a team December 13, 2019 15:39
@bajtos bajtos mentioned this pull request Dec 13, 2019
7 tasks
@KalleV KalleV force-pushed the kv_add_has_many_through_interface branch from 66f3ab9 to e38d823 Compare December 13, 2019 17:23
@KalleV
Copy link
Contributor Author

KalleV commented Dec 13, 2019

Seeing commit lint failures for the Node 12 environment in Travis: https://travis-ci.com/strongloop/loopback-next/jobs/267005076 but it seems to be unrelated to my commit.

@dhmlau
Copy link
Member

dhmlau commented Dec 15, 2019

@KalleV, for some reason, there are other commit messages in your commit. I remember someone else had a similar problem that they had to rebase it. Could you please try to git pull again to make sure you get the latest changes from the "origin" and rebase again? Thanks.

@dhmlau
Copy link
Member

dhmlau commented Dec 15, 2019

@agnes512, since you're more familiar with model relations, could you please review and help this PR to land? Thanks.

Add experimental interface for the new relation type "hasManyThrough" to support many-to-many model relations.
@KalleV KalleV force-pushed the kv_add_has_many_through_interface branch from e38d823 to ef9c83b Compare December 15, 2019 15:49
Copy link
Contributor

@agnes512 agnes512 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution!

@agnes512 agnes512 merged commit ced2643 into loopbackio:master Dec 16, 2019
@KalleV KalleV deleted the kv_add_has_many_through_interface branch December 16, 2019 15:14
@dhmlau
Copy link
Member

dhmlau commented Dec 19, 2019

In case you're interested, there is a LoopBack Developer badge for those who made contributions to LoopBack. Please check this out: https://www.ibm.com/services/learning/ites.wss/zz-en?pageType=badges&id=0de05804-8037-4791-ac83-09829b566d51. Thanks!

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 this pull request may close these issues.

None yet

5 participants