Hi.
I have been trying to update a many to many realationship from the inverse entity and i am getting a 'org.hibernate.LazyInitializationException: illegal access to loading collection'.
@ManyToMany(mappedBy = "fleets", fetch = FetchType.EAGER)
public List<User> getUsers() {
return users;
}
public void setUsers(List<User> users) {
// Add users to relation
if (users != null) {
for (User u : users) {
u.getFleets().add(this);
}
}
this.users = users;
}
Read about Seam Managed Persistence Contexts and conversations in the Seam ref docs.