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

ActiveRecord parity: allow selector arguments for .exists?

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 8.1.0
    • Affects Version/s: None
    • Component/s: Query
    • None
    • Fully Compatible

      In ActiveRecord, you can do the following:

      Customers.exists?(name: "Bob")

      This is equivalent to:

      Customers.where(name: "Bob").exists?

      Currently, Mongoid does not accept arguments for the .exists? method. It would be nice if this could be supported.

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

              Created:
              Updated:
              Resolved: