-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(repository): implement hasManyThrough resolver #6280
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
Conversation
5fa1573 to
8db9f24
Compare
|
@nabdelgadir what's the status of this pull request, is it ready for code review? I think @agnes512 is the best person to provide feedback. |
The approach I'm currently doing is done, but I want to see if I can improve it before opening it for review. (Just haven't had the time this week, but will look at it later today.) |
0dfe2b0 to
4d5554a
Compare
d2076a7 to
f88df38
Compare
agnes512
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Mostly LGTM, just have a few comments.
packages/cli/test/integration/generators/relation.has-many-through.integration.js
Outdated
Show resolved
Hide resolved
packages/repository/src/relations/has-many/has-many-through.inclusion.resolver.ts
Show resolved
Hide resolved
packages/repository/src/relations/has-many/has-many-through.inclusion.resolver.ts
Show resolved
Hide resolved
|
Let's add a test for self through with inclusion resolver as well https://github.com/strongloop/loopback-next/blob/master/packages/repository-tests/src/crud/relations/acceptance/has-many-through.relation.acceptance.ts#L282 |
216d3f0 to
69ccb6f
Compare
|
Thanks for the feedback @agnes512! I've updated the PR accordingly. 😄 |
69ccb6f to
7735003
Compare
agnes512
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I like those comments you added in the code. They made the review much easier. ![]()
packages/repository/src/relations/has-many/has-many-through.inclusion.resolver.ts
Show resolved
Hide resolved
Signed-off-by: Nora <nora.abdelgadir@ibm.com>
7735003 to
0e1b02e
Compare
Resolves #5946.
Similar to the other LoopBack relations, this PR aims to allow the hasManyThrough relation to also support querying related instances by enabling the resolver at the repository level.
Checklist
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated👉 Check out how to submit a PR 👈