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

docs: update belongsTo docs with decorator syntax #3772

Closed
wants to merge 1 commit into from

Conversation

deepakrkris
Copy link
Contributor

Fixes #2639

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 👈

@deepakrkris deepakrkris requested review from bajtos, dhmlau, jannyHou and agnes512 and removed request for bajtos September 19, 2019 16:19
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.

Good start! Let's improve the content 💪

docs/site/BelongsTo-relation.md Outdated Show resolved Hide resolved
docs/site/BelongsTo-relation.md Outdated Show resolved Hide resolved
docs/site/BelongsTo-relation.md Outdated Show resolved Hide resolved
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.

PTAL at my comments below.

I feel it's important to at least mentions the implications on HasMany relation definition. I believe some changes are necessary at HasMany side when the PK is not following our naming convention, we should make this clear to readers (e.g. by referring to the relevant section in HasMany doc page).

docs/site/BelongsTo-relation.md Outdated Show resolved Hide resolved
docs/site/BelongsTo-relation.md Outdated Show resolved Hide resolved
@dhmlau
Copy link
Member

dhmlau commented Sep 23, 2019

@deepakrkris, are you able to update the PR to address comments from @bajtos and @agnes512? Thanks.

@deepakrkris
Copy link
Contributor Author

@dhmlau , yes I am able to follow the scope of the review comments. But there are a dozen assumptions on how the simple params keyFrom, keyTo, name are thought to work viz a viz how they actual work (with respect to datasource juggler, etc). because of missing end to end tests and examples for the same. I am carefully going thru each of the comments and testing locally, so I can update with actual content.

@deepakrkris deepakrkris force-pushed the updateDocsBelongsToRelation branch from 7bfcfc6 to 9c92082 Compare September 25, 2019 17:16
@deepakrkris deepakrkris changed the title docs: update belongsTo docs to include keyFrom and keyTo docs: update belongsTo docs with decorator syntax Sep 25, 2019
@deepakrkris deepakrkris marked this pull request as ready for review September 25, 2019 17:38
@deepakrkris deepakrkris force-pushed the updateDocsBelongsToRelation branch from 9c92082 to 089ae42 Compare September 25, 2019 17:40
Copy link
Member

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @deepakrkris. I have a few comments. Thanks.

docs/site/BelongsTo-relation.md Outdated Show resolved Hide resolved
docs/site/BelongsTo-relation.md Outdated Show resolved Hide resolved
docs/site/BelongsTo-relation.md Outdated Show resolved Hide resolved
@deepakrkris deepakrkris force-pushed the updateDocsBelongsToRelation branch 3 times, most recently from 89602a6 to d0ca863 Compare September 25, 2019 21:43
@deepakrkris deepakrkris force-pushed the updateDocsBelongsToRelation branch from d0ca863 to f82c5e8 Compare September 25, 2019 22:53
@dhmlau
Copy link
Member

dhmlau commented Sep 26, 2019

@deepakrkris , I'm not sure which PR you want to use, so I've pushed the linting fixes to your other PR. See commit: c28eade.

Basically, what I've run is npm run lint:fix.

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.

I feel like we are discussing on different things. Please let me know if I misunderstand or miss anything.

docs/site/BelongsTo-relation.md Show resolved Hide resolved
@deepakrkris deepakrkris deleted the updateDocsBelongsToRelation branch September 26, 2019 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] belongsTo() not working in loopback4 - Cannot read property 'target' of undefined
5 participants