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

Totally unable to get it working #5

Open
janober opened this issue Jan 27, 2015 · 6 comments
Open

Totally unable to get it working #5

janober opened this issue Jan 27, 2015 · 6 comments

Comments

@janober
Copy link

janober commented Jan 27, 2015

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!

@nolandubeau
Copy link
Contributor

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 [email protected] 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
#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.

@nolandubeau
Copy link
Contributor

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.

@janober
Copy link
Author

janober commented Jan 27, 2015

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.

@janober
Copy link
Author

janober commented Jan 27, 2015

Yes you were right. The above example works totally fine with DP3.

@nolandubeau
Copy link
Contributor

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 [email protected] wrote:

Yes you were right. The above example works totally fine with DP3.


Reply to this email directly or view it on GitHub
#5 (comment)
.

_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.

@janober
Copy link
Author

janober commented Jan 28, 2015

Great thanks!

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

2 participants