mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-21 19:23:48 +01:00
Add transction
This commit is contained in:
parent
60923e4c8b
commit
538083ae83
@ -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<>();
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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)}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user