The problem was with life cycle of enties. All enties must be re-attached to the persistence context.
To resolve it i had to make getUserHasRolesList
method at userFacade
:
public List<UserHasRoles> getUserHasRolesList(User us){
us = em.merge(us); //here i re-attached entity
return us.getUserHasRolesList();
}
Same problem is here: OpenJPA - lazy fetching does not work and here: What's the lazy strategy and how does it work?