在我们的“进程”表中有一个“类型”列。该列的值集在我们代码的枚举中定义。但是,此表中有过时的行。这意味着有些行的“类型”是代码枚举中不存在的值。问题是每当我们访问此表中的任何行(不是过时的行)时,我们都会收到一个错误,即该列存在未知值。有没有办法在休眠中禁用此功能,因为我们不想删除这些行。
@EqualsAndHashCode(callSuper = true, of = {})
@Table(name = ProcessEntity.TABLE_NAME)
public class ProcessEntity extends BaseEntity implements ValidityHolder {
public static final String TABLE_NAME = "PROCESS";
@OneToMany(mappedBy = "consent", cascade = CascadeType.ALL)
private Set<ConsentAnswerEntity> consentAnswers;
@OneToMany(mappedBy = "consent", cascade = CascadeType.ALL)
private List<ProcessConsentEntity> processConsents;
@OneToMany(mappedBy = "consent", cascade = CascadeType.ALL)
private Set<ProcessTypeConsentEntity> processTypeConsents;
@Enumerated(EnumType.STRING)
@Column(name = "TYPE_ID")
private Type TpyeId;
幕布斯6054654
相关分类