How to change the model class in LoopBack framework
I tried to add a property manually to model class but it is not working.
I think that it has to be done with lb
command on cmd but I'm not sure.
How to add , update or remove a property on model class in Loopback framework ?
LoopBack version is 4.
You can add, update and remove properties from a model in LB4, only thing is if you update your data structure of the model, you will have to migrate the schema for the model if you are using some database like MySql or any RDMS, in case of MongoDB you can just clean the project by using command:
npm run clean
then building the project again
npm run build
and then starting the server normal with command \
npm run start
These commands are mentioned in the script object of the package.json
If you are using MySql as the database maybe this will help
How to use auto migration with loopback 4 for mysql datasource
Hopefully, this is helpful thanks