Я пытаюсь создать compount index следующим образом:
@CompoundIndexes(
value = [
CompoundIndex(
name = "entity_index",
unique = true,
def = "{'entityId':1, 'type': 1}"
)
]
)
data class Subscription(
@field:Id
val id: String,
val entityId: String,
val type: EntityType,
)
, но когда я сохраняю ту же модель с одинаковым entityId и типом с исключением ReactiveMongoTemplate, не генерируется