[JCBC-165] ComplexKey does not support partial compound keys with single field Created: 04/Dec/12  Updated: 06/Dec/12  Resolved: 06/Dec/12

Status: Resolved
Project: Couchbase Java Client
Component/s: Documentation
Affects Version/s: 1.1-beta
Fix Version/s: 1.1.0
Security Level: Public

Type: Bug Priority: Critical
Reporter: Chris Tashjian Assignee: Michael Nitschinger
Resolution: Fixed Votes: 0
Labels: None
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.
Generated at Sun Apr 20 20:19:18 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.