Add enable_lazy_load_no_trans fix.

main
Paulo Gustavo Veiga 2023-11-19 19:11:06 -08:00
parent 2b918a0df3
commit 63975464ca
2 changed files with 3 additions and 1 deletions

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.EAGER)
@OneToMany(mappedBy = "mindMap", orphanRemoval = true, cascade = {CascadeType.ALL}, fetch = FetchType.LAZY)
@Fetch(FetchMode.JOIN)
private Set<Collaboration> collaborations = new HashSet<>();

View File

@ -26,6 +26,8 @@
<prop key="hibernate.default_batch_fetch_size">200</prop>
<prop key="hibernate.nestedTransactionAllowed">true</prop>
<prop key="hibernate.auto_quote_keyword">true</prop>
<prop key="hibernate.enable_lazy_load_no_trans">true</prop>
</props>
</property>
</bean>