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

[CLI] lb4 repository relation support #1628

Closed
4 tasks
virkt25 opened this issue Aug 21, 2018 · 3 comments
Closed
4 tasks

[CLI] lb4 repository relation support #1628

virkt25 opened this issue Aug 21, 2018 · 3 comments
Labels
CLI developer-experience Issues affecting ease of use and overall experience of LB users Relations Model relations (has many, etc.) Repository Issues related to @loopback/repository package stale

Comments

@virkt25
Copy link
Contributor

virkt25 commented Aug 21, 2018

Description / Steps to reproduce / Feature proposal

If a user defines two models (TodoList, Todo) and defines a relation TodoList hasMany Todo then we should be able to recognize this during repository generation.

This isn't applicable if a repository for a model was defined before a relation was added to the model.

Acceptance Criteria

  • Based on the model the repository is being created for, detect any relational properties in the Model (ex: @hasMany, @belongsTo). For each relational property:
    • Prompt: Select repository for the Todo model so we can power the hasMany relation property todos. Provide an option of available repositories -- select a default based on naming convention, with the last option being to skip this (In which case we don't add any relation stuff to the repository).
  • Create a repository with the applicable relation related code (template iterates over each relational property and adds the appropriate code for linking the repositories).
  • Tests + Docs + Blog
@virkt25 virkt25 added the CLI label Aug 21, 2018
@dhmlau dhmlau added the post-GA label Aug 23, 2018
@virkt25
Copy link
Contributor Author

virkt25 commented Aug 28, 2018

related to #1359 -- Can't be estimated till the discussion there is resolved.

@dhmlau dhmlau removed the post-GA label Nov 2, 2018
@dhmlau dhmlau added Relations Model relations (has many, etc.) Repository Issues related to @loopback/repository package labels Nov 28, 2018
@bajtos bajtos added the developer-experience Issues affecting ease of use and overall experience of LB users label Jun 7, 2019
@stale
Copy link

stale bot commented Jun 2, 2020

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

@stale stale bot added the stale label Jun 2, 2020
@stale
Copy link

stale bot commented Jul 3, 2020

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI developer-experience Issues affecting ease of use and overall experience of LB users Relations Model relations (has many, etc.) Repository Issues related to @loopback/repository package stale
Projects
None yet
Development

No branches or pull requests

3 participants