Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
注釈のみを使用して、継承されたクラスで継承されたフィールドを一意としてマークすることは可能ですか? 私には振り子はNO側に向かっていますが、確認したいです
注釈のuniqueConstraints属性を使用できます。@Table
uniqueConstraints
@Table
@Table(uniqueConstraints = {@UniqueConstraint(columnNames = {"thecolumn"})})
SINGLE_TABLE 継承戦略を使用する複数のエンティティがない場合にのみ機能することに注意してください。