PHP SKD 2.0 Query Problem - Undefined property


#1

I am having an issue using the PHP SKD 2.0 to query a view.

I have connected to the couchbase cluster.

$this->couchConnection = new \CouchbaseCluster(yada yada yada);
$this->couchBucket = $this->couchConnection->openBucket(bucketname);

This works fine, I can perform get, set, upsert and remove quite easily on the documents in this bucket.
However, if I then try to perform a query like the following code…

$this->couchBucket->query(\CouchbaseViewQuery::from($document, $view));

The error occurs.
Undefined property: _CouchbaseDefaultViewQuery::$view

I have split apart the \CouchbaseViewQuery::from($document, $view) part and it creates what it is meant to fine, the issue seems to be there is something wrong with the ->query, I get the same result I believe when I use the ->_view function.

When I query the REST api to use the same views it works as expected.

Any help here would be great cause I would rather go into production using the SDK than cURL requests.

Thanks.


#2

Hey Daniel,

I have created a ticket to track this here: https://www.couchbase.com/issues/browse/PCBC-302. This will be fixed prior to our next minor release scheduled for the first Tuesday of November.

Cheers, Brett


#3

Thank you! Much appreciated.


#4

Hey willewolle,

Unfortunately, the release that went out today contained a typo that continues to cause the CouchbaseN1qlQuery class to miss-behave. A fix is however available on GitHub.

Cheers, Brett