有没有办法使用@AttributeOverride或其他注释添加(不替换)列信息?
我试图执行以下操作:
@Embeddable
class SomeEmbeddable {
@Column(length = 32)
private String myField;
}
@Entity
class SomeEntity {
@AttributeOverride(name = "myField", column = @Column(nullable = false))
private SomeEmbeddable myEmbeddableField;
}
我希望myEmbeddableField具有两者 nullable = false和length = 32,但当然,@ AttributeOverride注释会替换所有列约束。除了在SomeEntity类中设置length = 32之外,还有其他解决方法吗?
由于