mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-23 06:27:56 +01:00
fix lazy initialization error.
This commit is contained in:
parent
92edef9bd6
commit
55c104cfbe
@ -65,7 +65,7 @@ public class Mindmap implements Serializable {
|
|||||||
@Column(name = "public")
|
@Column(name = "public")
|
||||||
private boolean isPublic;
|
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)
|
@Fetch(FetchMode.JOIN)
|
||||||
private Set<Collaboration> collaborations = new HashSet<>();
|
private Set<Collaboration> collaborations = new HashSet<>();
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import com.wisemapping.rest.model.*;
|
|||||||
import com.wisemapping.security.Utils;
|
import com.wisemapping.security.Utils;
|
||||||
import com.wisemapping.service.*;
|
import com.wisemapping.service.*;
|
||||||
import com.wisemapping.validator.MapInfoValidator;
|
import com.wisemapping.validator.MapInfoValidator;
|
||||||
|
import jakarta.transaction.Transactional;
|
||||||
import org.apache.commons.validator.routines.EmailValidator;
|
import org.apache.commons.validator.routines.EmailValidator;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -47,6 +48,7 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
@Transactional
|
||||||
@PreAuthorize("isAuthenticated() and hasRole('ROLE_USER')")
|
@PreAuthorize("isAuthenticated() and hasRole('ROLE_USER')")
|
||||||
public class MindmapController extends BaseController {
|
public class MindmapController extends BaseController {
|
||||||
final Logger logger = LogManager.getLogger();
|
final Logger logger = LogManager.getLogger();
|
||||||
|
Loading…
Reference in New Issue
Block a user