Open janober opened 9 years ago
With N1QL there is sometimes a delay in being able to retrieve the document right away due to it's indexing. Can you show me what your document looks like in couchbase?
On Tue, Jan 27, 2015 at 3:24 PM, Jan notifications@github.com wrote:
I now wanted to give that connector a try but simply I am unable to get it working.
Created a simply Test model:
{ "name": "Test", "plural": "Tests", "properties": { "name": { "type": "string", "required": true } }, "validations": [], "relations": {}, "acls": [], "methods": [] }
But no matter if I define no id at all like above, or like this:
"id": { "id": true, "index": true, "type": "string", "required": true }
or like in the beer-example
"docId": { "type": "string", "required": true },
I am always able to create the document but totally unable to query it. A GET to "/Tests" simply returns an empty array and a specific request for the ID an error like this: Unknown "Test" id "asdf". Even though the document exists in Couchbase.
Did I overlook something or do I simply use it totally wrong? (I am using Couchbase 3.0.1 locally on ubuntu)
Thanks!
— Reply to this email directly or view it on GitHub https://github.com/guardly/loopback-connector-couchbase/issues/5.
_Nolan Dubeau_VP, Engineering, Guardly Corp. Online: https://www.guardly.com LinkedIn: http://www.linkedin.com/in/nolandubeau 20 Maud Street, Suite 307, Toronto, ON M5V 2M5 CA (416) 434-8029 | US (650) 262-3599 | Skype: nolandubeau Please consider the environment before printing this email.
Hi, currently we have only tested the connector with N1QL Developer Preview 3. Are you using DP3 or DP4? If 4, can you please install DP3 and try it out? I will leave your PR for the moment until we are able to fully test DP4 which we are doing right now. We also just published an updated version of the connector that provides "IN" functionality for WHERE clauses.
Thanks a lot for the fast answer!
Add via POST to Tests/
{
"id": "asdf",
"name": "asdf"
}
Response is:
{
"id": {
"cas": {
"0": 3692036096,
"1": 931969184
},
"id": "asdf",
"docType": "Test"
},
"name": "asdf"
}
The document in couchbase:
{
"id": "asdf",
"name": "asdf",
"docType": "Test"
}
I use DP4, had honestly no idea about different versions there. So maybe that is the issue. Will now give it a try with DP3 and then report.
Yes you were right. The above example works totally fine with DP3.
That's great! We will be testing DP4 tomorrow and will provide an update once we run through our scenarios.
On Tue, Jan 27, 2015 at 5:40 PM, Jan notifications@github.com wrote:
Yes you were right. The above example works totally fine with DP3.
— Reply to this email directly or view it on GitHub https://github.com/guardly/loopback-connector-couchbase/issues/5#issuecomment-71743698 .
_Nolan Dubeau_VP, Engineering, Guardly Corp. Online: https://www.guardly.com LinkedIn: http://www.linkedin.com/in/nolandubeau 20 Maud Street, Suite 307, Toronto, ON M5V 2M5 CA (416) 434-8029 | US (650) 262-3599 | Skype: nolandubeau Please consider the environment before printing this email.
Great thanks!
I now wanted to give that connector a try but simply I am unable to get it working.
Created a simply Test model:
But no matter if I define no id at all like above, or like this:
or like in the beer-example
I am always able to create the document but totally unable to query it. A GET to "/Tests" simply returns an empty array and a specific request for the ID an error like this: Unknown "Test" id "asdf". Even though the document exists in Couchbase.
Did I overlook something or do I simply use it totally wrong? (I am using Couchbase 3.0.1 locally on ubuntu)
Thanks!