Closed li-zheng-hao closed 2 years ago
specify index keys by chaining calls to the .Key() method. compound indexes are created by calling the .Key() method multiple times.
so when you call .Key()
multiple times, you're creating a compound index.
so the uniqueness applies to the compound index as a whole.
to create single key indexes, just call .Key()
once per each .CreateAsync()
call.
hello i just started using this library,in the above case,will unique attribute apply on A or B or Both?