hibernate异常
<h1> nested exception is org.hibernate.LazyInitializationException:</h1>
stackoverflow:http://stackoverflow.com/questions/36106620/failed-to-lazily-initialize-a-collection-of-role-user-authorities-could-not-in
也可以
@ManyToMany(fetch = FetchType.LAZY) ==》 (fetch = FetchType.EAGER)
@Fetch(FetchMode.SUBSELECT)
@JoinTable(
name = "sys_user_role",
joinColumns = { @JoinColumn(name = "role_id") },
inverseJoinColumns = @JoinColumn(name = "user_id")
)
@JsonIgnore
public Set<SysUser> getSysUsers() {
return sysUsers;
}
public void setSysUsers(Set<SysUser> sysUsers) {
this.sysUsers = sysUsers;
}
你以为躲起来就找不到你了吗?没有用的!象你这样出色的男人,无论在什么地方,都像漆黑中的萤火虫一样,那样的鲜明,那样的出众。你那忧郁的眼神,稀嘘的胡喳子,神乎其神的刀法,和那杯Dry Martine,都深深地迷住了我!