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 |
|
@fgvicente all models are binded in the application context with prefix |
|
A better way is to use |
|
Try this please: |
Uh oh!
There was an error while loading. Please reload this page.
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?
All reactions