[JCBC-165] ComplexKey does not support partial compound keys with single field Created: 04/Dec/12 Updated: 06/Dec/12 Resolved: 06/Dec/12
|Project:||Couchbase Java Client|
|Reporter:||Chris Tashjian||Assignee:||Michael Nitschinger|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
I can't figure out how to do partial compound keys with a single value --
ex. 1 - Specifying both parts of the key:
ex. 2 - Only specifying the first part of the key:
I can get ex. 1 to work via the Java client library, but I've had no luck with ex. 2. I've tried setting ranges, complex keys and regular keys. The closest I get is a query string where the "[" and "]" have been escaped which results in a bad URL. I was only able to get this far by manually concatenating the "[" and "]" onto my key and using the query.setKey(String) method.
I believe that ComplexKey should be able to handle ex 2 by calling ComplexKey.of("0") and ComplexKey.of("Z").
|Comment by Michael Nitschinger [ 04/Dec/12 ]|
|Correct, I came across it today as well.|
|Comment by Michael Nitschinger [ 05/Dec/12 ]|
|Comment by Michael Nitschinger [ 06/Dec/12 ]|
|you can now use the forceArray method on the ComplexKey to do this! .. will be available in 1.1.0.|