Skip to content
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

Deprecation Warnings & LB3 #12

Open
eatnlunch opened this issue Mar 14, 2017 · 2 comments
Open

Deprecation Warnings & LB3 #12

eatnlunch opened this issue Mar 14, 2017 · 2 comments

Comments

@eatnlunch
Copy link

eatnlunch commented Mar 14, 2017

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

@ChopperLee2011
Copy link

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

@ramshgithub
Copy link

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": {}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants