Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-154

AgnosticCursor fails with "collation" method

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.2
    • Affects Version/s: 1.1
    • Component/s: None
    • None

      Hi,
      In my app I'm using motor+tornado. I've tried to execute query with collation()

      db["test_collection"].find({}).sort("field").collation(Collation("pl")).to_list(length=1)
      

      Unfortunately, `core.AgnosticCursor` has `collation` defined as `ReadOnlyProperty()` not `MotorCursorChainingMethod()` and the code fails with error

      AttributeError: 'Cursor' object has no attribute 'to_list'
      

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            karolhor Karol Horowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: