Closed richardzyx closed 6 years ago
Thanks for opening an issue. I think I did the same thing at one point but IIRC this isn't the correct approach. Mind sharing a link to the docs you saw this in?
Feel free to test it yourself, the current one doesn't work and I got this syntax from one of the PRs for hapi-mongo-models: https://github.com/jedireza/hapi-mongo-models/issues/69 Detailed document on MongoDB can be found here: https://docs.mongodb.com/manual/reference/command/createIndexes/ unique
field is on the same level with key
Thanks for the links. I'll test and confirm this when I get some time.
Thank you again. This was a big oversight on my part. 😆
Haha keep up the great work! Thanks!
I believe this is the correct syntax for unique indexing? Tested on mlab.
Thanks!