Hi @all,
After Migration hibernate 5 to hibernate 6, as below I have Mapping :
@Entity
@Indexed
public class Case extends VersioningEntity {
@IndexedEmbedded(includePaths = {"allocatedTo", "outcome", "taskStatusType.id", "taskTypeId", "completedDate", "taskTypeOutcomeCombo","taskAdminCorrectionCode"})
@OneToMany(mappedBy = "theCase", cascade = CascadeType.ALL, orphanRemoval = true)
@JsonIgnore
@XmlTransient
private List<HistoryTask> historyTasks;
Similar in another entity as below :
public class HistoryTask implements Serializable {
@ManyToOne
@JoinColumn(name = "case_id", nullable = false, insertable = false, updatable = false)
@XmlTransient
@JsonIgnore
@BeanFieldIgnore
private Case theCase;
@OneToMany
@JoinColumn(name="`key`", referencedColumnName="task_outcome", insertable=false, updatable=false)
@JsonIgnore
@XmlTransient
private Set<Translation> translations;
But after save call , which linked to Case entity, I am getting below Error :
ERROR|2024-11-14 17:15:40,929|http-nio-8080-exec-11| CaseServiceImpl - CaseServiceImpl.saveCaseBasicInformation() EXCEPTION
org.springframework.orm.jpa.JpaSystemException: Found shared references to a collection: com.eurodyn.eips.core.db.entity.HistoryTask.translations
Same code was working earlier with Hibenrate 5 / Hibernate search 5
Please suggest , what I am doing wrong here.