You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The intention in the data model is that Work.alias should be optional. However, when creating works without an alias it is still included in this index, despite the sparse flag.
It's a problem with the compound sparse key implementation from MongoDB. If any of both keys is present, both are going to be included in the index.
Directly in the mongo shell:
- adding a work with no owner nor alias: no problem
- adding a work with duplicate owner and no alias: dup-key error
- adding a work with duplicate alias and no owner: dup-key error
The intention in the data model is that
Work.alias
should be optional. However, when creating works without an alias it is still included in this index, despite the sparse flag.Which results in a duplicate key error when the same users creates another work without an alias.
The text was updated successfully, but these errors were encountered: