mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 11:53:48 +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")
|
||||
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<>();
|
||||
|
||||
|
@ -24,6 +24,7 @@ import com.wisemapping.rest.model.*;
|
||||
import com.wisemapping.security.Utils;
|
||||
import com.wisemapping.service.*;
|
||||
import com.wisemapping.validator.MapInfoValidator;
|
||||
import jakarta.transaction.Transactional;
|
||||
import org.apache.commons.validator.routines.EmailValidator;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@ -47,6 +48,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Controller
|
||||
@Transactional
|
||||
@PreAuthorize("isAuthenticated() and hasRole('ROLE_USER')")
|
||||
public class MindmapController extends BaseController {
|
||||
final Logger logger = LogManager.getLogger();
|
||||
|
Loading…
Reference in New Issue
Block a user