eslint-config-trybe icon indicating copy to clipboard operation
eslint-config-trybe copied to clipboard

Deprecation Warnings & LB3

Open eatnlunch opened this issue 7 years ago • 2 comments

Recent versions of the Loopback 2.x versions have introduced deprecation warnings, which the readme does not seem to address.

When running under LB 3.X, I get a "Model not found: mixins" error when the application boots. Also a warning: " warning: you are using async-hook which is unstable."

Is this module compatible with LB 3.X? Am I missing something with regards to handling these deprecation warnings?

edit: I found the cause of my 'Model not found: mixins' error. It was mis-placement on my part in the model-config.json file.

However, now all my models throw errors: Model "XYZ" uses unknown mixin: Readonly

eatnlunch avatar Mar 14 '17 19:03 eatnlunch

the code to find mixin source files from Loopback seems do not include nest folders https://github.com/strongloop/loopback-boot/blob/master/lib/plugins/mixin.js#L91 @eatnlunch you can include this mixin with "../node_modules/loopback-ds-readonly-mixin/lib" in model-config.json file

ChopperLee2011 avatar Apr 06 '17 09:04 ChopperLee2011

I am facing an issue as "column "columnname" does not exist", when i try to find any data from my Person table.I have 'name' and 'role' fields in my Person table, and 'status' is not present in my table(not require same in table).But my model.json have name,role and status as i needed all these fields in my explorer API.how can i solve this error?this happens whenever we have extra column name in model which is not present in our DB

Person.json

"name": "Person", "base": "PersistedModel", "idInjection": true, "options": { "validateUpsert": true }, "properties": { "name": { "type": "string" }, "status": { "type": "string" }, "role": { "type": "string" } }, "validations": [], "relations": { "products": { "type": "hasMany", "model": "Product", "foreignKey": "personId", "description": "Returns a list of products associated with a person." } }, "methods": {} }

ramshgithub avatar Dec 20 '17 12:12 ramshgithub