-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feature Request - API for dynamic model creation #1580
Comments
yes, please - I depend on the ability to dynamically generate models. |
I depend on this as well, which would also need to create the controller and repository dynamically from a database or other service. |
I think this is related to #1517. |
@dhmlau Thank you the information. However, the dynamic I meant was a bit different. Actually, strongloop had implemented a GUI which has the feature similar to what I described, I think it's called Strongloop's Arc or Studio which you can mange a model from web UI. As the current loopback backend that I experienced, I think it will need to restart the server once you have made changes on the model, which made model definition static. What I meant was an API to generate model and save and the load new model without restart server. |
The correct related to issue is #433 |
also need the plain old createModel method that lets you create a model programmatically rather than from json files, etc. Also the ability to change it (including adding and removing hooks) without having to recreate the model. |
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 |
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 |
The pull request #4235 shows how to define a model and expose it via a REST API at runtime. Feel free to join the discussion there or in follow-up stories we are going to create soon. |
Description / Steps to reproduce / Feature proposal
I have checked in here https://loopback.io/doc/en/lb4/LoopBack-3.x.html and don't think what I am about to mention was existing in the plan so I would like to purpose.
I am using LB 3 and wish the model to be able to create programmatically (run time) by calling an API, instead of manually defining JSON.
Current Behavior
Programmer will have to manually add JSON file, or generate by CLI, for each model. If an additional model is needed, we will have to restart the server.
Expected Behavior
I wish the model can be created either adding JSON file or calling an API and the system will create a model and corresponding JSON file if needed.
Another idea is moving models definition to be defined in lowdb JSON, instead of plain JSON. This way programmer may create their own API to dynamically create models.
See Reporting Issues for more tips on writing good issues
The text was updated successfully, but these errors were encountered: