Details
-
Task
-
Resolution: Works as Designed
-
Major - P3
-
None
-
None
Description
I'm not sure when this has changed, but since the
IMongoIndexManager.CreateOne(IndexKeysDefinition<TDocument> keys, CreateIndexOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) |
overload has been marked as deprecated, I can't find a way to create a single unique index without using deprecated methods.
In fact, the suggested one only accepts a CreateOneIndexOptions, which doesn't contain a property for setting the index as unique.
IMongoIndexManager.CreateOne(CreateIndexModel<TDocument> model, CreateOneIndexOptions options = null, CancellationToken cancellationToken = default(CancellationToken)); |
Plus, I see no mention of this change in the package release notes, and the documentation still uses the methods that are marked as deprecated. This is very confusing.
Is there a reason why those methods were marked as obsolete? It seems that avoiding those only creates problems, because of missing properties and a more complex input type (CreateIndexModel instead of IndexKeysDefinition, but the first just wraps the second).
Thanks.
Attachments
Issue Links
- related to
-
CSHARP-2475 Update documentation to refer to the current versions of the index creation methods
-
- Backlog
-