Symfony 6 сделать уникальной комбинацию полей в энтити
Пытаюсь сделать уникальные записи в БД с определенной комбинацией полей, но почему-то это не работает...
#[Table(name: '`user_group`',
uniqueConstraints: [new ORM\UniqueConstraint(name: "map_unique", columns: ["user_id", "group_id"],
options: ["message" => "This user already exists in the given group"])])]