use DoctrineORMMappingUniqueConstraint; /** * UserTreasure * * @ORMTable(name="user_treasures", uniqueConstraints={@UniqueConstraint(name="snatch_treasure_lottery_number_unique", columns={"snatch_treasure_id", "lottery_number"})}) * @ORMEntity(repositoryClass="TronWebBundleRepositoryUserTreasureRepository") */
在userTreasure表中增加组合唯一键:snatch_treasure_lottery_number_unique
它为:snatch_treasure_id,lottery_number的组合