changed usersession fetchtype to lazy
This commit is contained in:
parent
84c2c7c245
commit
a91a142685
@ -2,7 +2,9 @@ package org.ros.chatto.model;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
@ -10,8 +12,6 @@ import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.ros.chatto.model.ChatUser;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ -22,7 +22,7 @@ public class UserSession {
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
// private String sessionId;
|
||||
@OneToOne
|
||||
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "user_id")
|
||||
private ChatUser user;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user