-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
CLIdeveloper-experienceIssues affecting ease of use and overall experience of LB usersIssues affecting ease of use and overall experience of LB usersstale
Description
User Scenario
I'd like to create REST APIs with an existing database.
Current Behavior
Steps involved:
- Scaffold the app using
lb4 appcommand - Discover schema
Insrc/application.tsfile, use DataSource.discoverSchemas to discover the mode definitions - Create an empty model with
Entityas baseClass, usinglb4 modelcommand.
Copy and paste the json from step 2 in the generated model.ts located insrc/modelsfolder.
See details in:
strongloop/v4.loopback.io#50 (comment)
strongloop/v4.loopback.io#50 (comment)
To-dos
- Document this model discovery path possibly in the "How tos" section in the docs
Potential Enhancement
- @marioestradarosa suggested to discover the model through the
lb4 modelcommand such that:
lb4 model --table mysqlTable --datasource myDS
- Proposed by @bajtos, a
lb4 discovercommand would be helpful - see CLI for model discovery in LB4 #1949
See his comment for more details.
See also #1949
See Reporting Issues for more tips on writing good issues
Metadata
Metadata
Assignees
Labels
CLIdeveloper-experienceIssues affecting ease of use and overall experience of LB usersIssues affecting ease of use and overall experience of LB usersstale