Replies: 4 comments
-
@fgvicente Models in LoopBack 4 describe the shape of data. Behavior like CRUD operations is added by repositories. This is different from LoopBack 3.x where models implement behavior too. You can check model and migrating models from LB3 to LB4 to understand more about the differences.
In LB4 your models are usually defined in folder import * as models from './models'; The APIs are defined in repositories, see https://loopback.io/doc/en/lb4/Repositories.html |
Beta Was this translation helpful? Give feedback.
-
@fgvicente all models are binded in the application context with prefix |
Beta Was this translation helpful? Give feedback.
-
A better way is to use |
Beta Was this translation helpful? Give feedback.
-
Try this please: |
Beta Was this translation helpful? Give feedback.
-
Ok.
in lb3...I get al model with this....
let models = app.models();
and I get all method for one model this...
let model = app.models[modelName]; let methods = model.sharedClass.methods()
my question...
How would it be in lb4?
Beta Was this translation helpful? Give feedback.
All reactions