Improve lb4 discover to discover relations
Suggestion
Actually a models can be discovered from a supported datasource by running the lb4 discover command. But this didn't detect relation between table . But for me, the strong advantage of the discover option is to detect the relation beetween model and create the navigational property. If the datasource support this feature (For exemple: mysql),
Use Cases
This will allow us to save time when creating model for an existing database. For exemple if you want to migrate to loopback 4 with an existing database.
What shortcomings exist with current approaches?
Actually the model is create right but the navigational property is not created.
Examples
An exemple how the feature can be use is to run lb4 discover with a new extra argument or just add this feature by default.
Acceptance criteria
TBD - will be filled by the team.
@bajtos, do you think it would be part of the strong relation epic?
Any update on this?
Was able to add relation support. https://github.com/aspectgfg/loopback-next Only changes were to grab model defs with relations/foreignKeys, and then run the Relation Generator for each relation. It's not good enough for a PR though, do with it what you will.
I believe this feature request is a vital one just like feature request #6002
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.
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.