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

.first and .last don't apply limit of 1

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      I have a has_and_belongs_to_many :items, inverse_of: nil on my model and when I do items.first (or .last), the resulting query does not have limit=1. Should it always be the case when calling first/last on a plural relation?

            Assignee:
            Unassigned Unassigned
            Reporter:
            emirkin Eugene Mirkin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: