Using a string instead of a hash in the projection method will freeze the method call

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.0.3
    • Affects Version/s: 2.0.2
    • Component/s: Public API
    • None
    • Environment:
      Linux, IRB session
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I decided to try the projection API without reading the documentation and tried something like this:

      connection['MyCollection'].find.projection('user').first

      It should be projection(user: 1) instead, but I don't think it should freeze when passing a string instead of a hash... An error message would be welcomed in this case.

            Assignee:
            Spencer Brown
            Reporter:
            Rodrigo Rosenfeld Rosas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: