diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java index 64253a33..5c273b83 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java @@ -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 collaborations = new HashSet<>(); diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/MvcMindmapController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/MvcMindmapController.java index 9622d162..bfca1266 100644 --- a/wise-webapp/src/main/java/com/wisemapping/webmvc/MvcMindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/webmvc/MvcMindmapController.java @@ -36,6 +36,8 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @@ -46,6 +48,7 @@ import org.springframework.web.servlet.ModelAndView; import java.util.Locale; @Controller +@Transactional(propagation = Propagation.REQUIRED) public class MvcMindmapController { @Qualifier("mindmapService") diff --git a/wise-webapp/src/main/webapp/WEB-INF/views/reactInclude.jsp b/wise-webapp/src/main/webapp/WEB-INF/views/reactInclude.jsp index 197cbf19..31797231 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/views/reactInclude.jsp +++ b/wise-webapp/src/main/webapp/WEB-INF/views/reactInclude.jsp @@ -27,7 +27,6 @@ <%-- Hack to force view selection on react to move all the UI to react --%> window.errorMvcView = '${requestScope['exception']!=null?(fn:indexOf(requestScope['exception'],'SecurityException') gt 1?'securityError':'unexpectedError'):''}'; /* - ${requestScope['exception']} ${requestScope['exception'].printStackTrace(pageContext.response.writer)} ${requestScope['javax.servlet.error.exception'].printStackTrace(pageContext.response.writer)} */