I'm trying to add a unique composite key in my document as follows:
@Document
@CompoundIndexes({
CompoundIndex(def = "{'firstName':1, 'lastName':1}", name = "compound_index_1", unique = true)
})
But I'm getting the error:
An annotation argument must be a compile-time constant.
can anybody help me?