Hibernate 在 PostgreSQL 中生成这样的外键约束:
ADD CONSTRAINT fk4027e58ea8b36313 FOREIGN KEY (fk_responsible_person)
REFERENCES employee (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
我想
ON UPDATE RESTRICT ON DELETE RESTRICT
我目前的注释:
@ManyToOne(optional = true, fetch = FetchType.EAGER)
@JoinColumn(name = "fk_responsible_person", updatable = true, nullable = true)
public Employee getResponsiblePerson()
{
return m_responsiblePerson;
}
我必须使用什么样的配置/注释来获得“限制”而不是“不采取行动”?