Move collaborations to header to prevent aused by org.hibernate.LazyInitializationException: could not initialize proxy [com.wisemapping.model.Collaborator#758998] - no Session error

This commit is contained in:
Paulo Gustavo Veiga 2023-11-19 18:55:16 -08:00
parent 9c1320b63b
commit 2b918a0df3

View File

@ -65,7 +65,7 @@ public class Mindmap implements Serializable {
@Column(name = "public")
private boolean isPublic;
@OneToMany(mappedBy = "mindMap", orphanRemoval = true, cascade = {CascadeType.ALL}, fetch = FetchType.LAZY)
@OneToMany(mappedBy = "mindMap", orphanRemoval = true, cascade = {CascadeType.ALL}, fetch = FetchType.EAGER)
@Fetch(FetchMode.JOIN)
private Set<Collaboration> collaborations = new HashSet<>();