Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1163

No createIndex signature exists to match keyspec, name, unique

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.13.0, 3.0.0
    • Affects Version/s: 2.12.0, 3.0.0
    • Component/s: API, Command Operations
    • Labels:
      None

      In migrating from 2.11.2 to 2.12.0, we've encountered a multitude of cases where we were using:

      dbCollection.ensureIndex(new BasicDBObject("foo", 1), "someName", true);
      

      Doing the find/replace 's/ensureIndex/createIndex/g' wouldn't be bad, but not having a matching 3-arg createIndex(spec, name, unique) makes migrating more manual and error prone.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            john.morales@mongodb.com John Morales (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: