-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: 7.1.5
-
Component/s: Associations
-
None
-
Environment:Rails
When creating a compound index on a HABTM field, the index key is not singular and does not have _ids suffix
belongs_to :project has_and_belongs_to_many :users, index: true # => {"user_ids"=>1}, index({ project: 1, users: 1 }) # => {"project_id"=>1, "users"=>1}, # # whereas this produces the good key name index({ project: 1, relations[:users].foreign_key: 1 }) # => {"project_id"=>1, "user_ids"=>1},
```
- related to
-
MONGOID-5314 Expand storage field names in index specification values
- Closed