Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5428

Set driver options in mongoid.yml

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible

      This ticket is now for adding the ability to set driver options in the mongoid.yml.

      Original Ticket
      ===========

      In RUBY-2699, finder methods were fixed to take view options into account:

      Unable to find source-code formatter for language: ruby. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      view.limit(1).count
      

      and were hidden behind a feature flag. This ticket proposes to include a Mongoid feature flag which mirrors the Mongo one. Since the same problem exists in Mongoid:

      Band.all.limit(1).count
      

      only works when Mongo.broken_view_options is off. I think it's rather awkward to switch on a Mongo feature flag for what appears to be a Mongoid feature.

      We would also have to bump the minimum ruby driver version for mongoid 8.0 to 2.18

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: