Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-68

Query.copy() copies Key into EndkeyDocID

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.1dp2
    • 1.1dp
    • Core
    • Security Level: Public
    • None
    • All.
      Tested on Ubuntu Server 12.04LTS, Oracle/Sun JDK 1.6.0_31

    Description

      The bug causes all query results are not as expected: in every case "key" argument is changed to "EndkeyDocID".

      My proposed patch:

      $
      diff --git a/src/main/java/com/couchbase/client/protocol/views/Query.java b/src/main/java/com/couchbase/client/protocol/views/Query.java
      index fca7ccf..3a019a0 100644
      — a/src/main/java/com/couchbase/client/protocol/views/Query.java
      +++ b/src/main/java/com/couchbase/client/protocol/views/Query.java
      @@ -174,7 +174,7 @@ public class Query

      { query.setInclusiveEnd(((Boolean)args.get(INCLUSIVEEND)).booleanValue()); }

      if (args.containsKey(KEY))

      { - query.setEndkeyDocID(((String)args.get(KEY))); + query.setKey(((String)args.get(KEY))); }

      if (args.containsKey(LIMIT)) {
      query.setLimit(((Integer)args.get(LIMIT)).intValue());
      $

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mikew Mike Wiederhold [X] (Inactive)
            josemrecio Jose
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty