-
Notifications
You must be signed in to change notification settings - Fork 23
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
Using built-in user model #2
Comments
Hi Andre, Can you provide a sample of your models? We haven't done extensive testing Nolan On Tue, Dec 23, 2014 at 7:09 AM, Andre197789xh [email protected]
_Nolan Dubeau_VP, Engineering, Guardly Corp. |
Hi Nolan, thanks for your reply. I just setup a simple project, i did not extend any of the built-in models. I added an own "Note"-model, and as stated before, this works (CRUD) in Couchbase server. Also all the other models (User, AccessToken, RoleMapping, Role) work. Problem is the "ACL"-model, if i set this to use the "couchbase"-datasource nothing works anymore and i get the exception mentioned in my first post. So this is the only model i defined in the whole project: { Thanks |
@ecguardly, I have repoduced this issue however do not know why it is occurring at this point. try cloning this repo and updating the db/model configs to use couchbase - https://github.com/strongloop/loopback-example-access-control. If by chance you come across this issue - https://groups.google.com/forum/#!topic/strongloop/R8XvXvvE1ho, it can be resolved by running npm install loopback-connector-couchbase --save. I got this issue by copying the connector from an another project as opposed to using npm to install. |
We are in the process of writing a fix for this as some of the functionality for WHERE clauses was not completed. |
Hi, we have published a new version of the connector, which should fix this issue. Please test and let us know. |
Hi, thanks, thats great. I have tested it and it works without any flaws so far...Thanks for your efforts! |
Hi,
i try to use the connector with the built-in user model. This works fine (also for other, non built-in models) as long as i do not attach the ACL-model to the couchbase datasource. If i do, i get this error in the explorer console (even when doing requests to other, non built-in models):
{
"error": {
"name": "Error",
"status": 500,
"message": "inq is an unknown key",
"statusCode": 500,
"stack": "Error: inq is an unknown key\n at defaultHandler (C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\strong-remoting\lib\rest-adapter.js:337:15)\n at restErrorHandler (C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\strong-remoting\lib\rest-adapter.js:327:14)\n at Layer.handle_error (C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\express\lib\router\layer.js:58:5)\n at trim_prefix (C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\express\lib\router\index.js:269:13)\n at C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\express\lib\router\index.js:238:9\n at Function.proto.process_params (C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\express\lib\router\index.js:313:12)\n at C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\express\lib\router\index.js:229:12\n at Function.match_layer (C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\express\lib\router\index.js:296:3)\n at next (C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\express\lib\router\index.js:190:10)\n at Layer.handle_error (C:\Users\Andre\WebstormProjects\couchbase-neu\node_modules\loopback\node_modules\express\lib\router\layer.js:54:12)"
}
}
This is my setup for datasources.json and model-config.json:
{
"db": {
"name": "db",
"connector": "memory"
},
"couchbase": {
"connector": "couchbase",
"database": "user_bucket"
}
}
{
...
"User": {
"dataSource": "couchbase",
"public": true
},
"AccessToken": {
"dataSource": "couchbase",
"public": true
},
"ACL": {
"dataSource": "couchbase",
"public": true
},
"RoleMapping": {
"dataSource": "couchbase",
"public": true
},
"Role": {
"dataSource": "couchbase",
"public": true
},
"Note": {
"dataSource": "couchbase",
"public": true
}
}
If i set ACL-datasource back to use the in-memory db everything works fine!? Do you have any clue whats going on?
The text was updated successfully, but these errors were encountered: