fix: 懒加载bug修复

This commit is contained in:
张松 2024-11-20 09:44:11 +08:00
parent f74f47fa40
commit 10ec7e09fb
2 changed files with 3 additions and 3 deletions

View File

@ -27,14 +27,14 @@ public class Deploy extends BaseEntity implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToMany
@ManyToMany(fetch = FetchType.EAGER)
@ApiModelProperty(name = "服务器", hidden = true)
@JoinTable(name = "mnt_deploy_server",
joinColumns = {@JoinColumn(name = "deploy_id",referencedColumnName = "deploy_id")},
inverseJoinColumns = {@JoinColumn(name = "server_id",referencedColumnName = "server_id")})
private Set<ServerDeploy> deploys;
@ManyToOne
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "app_id")
@ApiModelProperty(value = "应用编号")
private App app;

View File

@ -34,7 +34,7 @@ public class Role extends BaseEntity implements Serializable {
private Long id;
@JSONField(serialize = false)
@ManyToMany(mappedBy = "roles")
@ManyToMany(mappedBy = "roles", fetch = FetchType.EAGER)
@ApiModelProperty(value = "用户", hidden = true)
private Set<User> users;