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

index when using field aliasing

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

      when using field aliasing, I think the correct would be defining the index using the alias name, but now only work if using the field real name

      this does not work (does not create index to field "a"):
      field :a, as: :authentication_token
      index(

      { authentication_token: 1 }

      ,

      { unique: true }

      )

      this works:
      field :a, as: :authentication_token
      index(

      { a: 1 }

      ,

      { unique: true }

      )

            Assignee:
            durran Durran Jordan
            Reporter:
            fabioperrella fabio perrella
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: