Recently migrated to spring boot 3 and have run into the following issue.
@Audited
@Entity
class ParentEntity {
...
@NotAudited
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
@JoinColumn(name = "trace_info_id")
@JsonIgnore
private TraceInfo traceInfo;
}
@Entity
@Table(name = "trace_infos")
public class TraceInfo extends IDEntity {
...
}
@Audited(
targetAuditMode = RelationTargetAuditMode.NOT_AUDITED
)
public class IDEntity {
@Id
@GeneratedValue
private Integer id;
}
When I try to insert a record into ParentEntity class, hibernate looks for a sequence called trace_infos_seq
, and cant find it. On startup the sequence it generates is called trace_info_id_seq
. Is this expected behavior? How do I get it to look for the correct sequence?