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

Option to disable automatic sorting of referenced objects

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

      Hi,

      I have models Group and Person. They have a has_and_belongs_to_many relation with each other.
      My problem is this: for a reason I won't bother you with, I want group.persons to return the persons in exactly the same order as I put them in (the order I get for group.person_ids).

      I've tried to use the :order option for this, but apparently there is no value that will prevent the sorting.

            Assignee:
            Unassigned Unassigned
            Reporter:
            teunvanvegchel teunvanvegchel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: