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

rake db:mongoid:create_indexes ensures indexes in subclasses multiple times

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

      In lib/mongoid/railties/database.rake#get_mongoid_models, it finds all the models, including those that are subclasses of models including Mongoid::Document. Then in lib/rails/mongoid.rb#index_children it indexes those models, and their subclasses. So we end up with the subclasses getting done twice.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bensymonds Ben Symonds
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: