【发布时间】:2019-09-02 16:01:01
【问题描述】:
我正在尝试在我的文档中添加一个唯一的复合键,如下所示:
@Document
@CompoundIndexes({
CompoundIndex(def = "{'firstName':1, 'lastName':1}", name = "compound_index_1", unique = true)
})
但我得到了错误:
An annotation argument must be a compile-time constant.
谁能帮帮我?
【问题讨论】:
标签: mongodb spring-boot kotlin