由于JPA映射,我有3个以上的类,UserRole
类。我如何填充我的User
类,它作为我的JSF页面的支持bean?
User.Java
public class User implements Serializable {
private String name;
private List<UserRole> userRoleList;
//getters and setters for both
Role.Java
public class Role implements Serializable {
private String roleName;
//getters and setters
UserRole.Java
public class UserRole implements Serializable {
private Role role;
private User user;
//getters and setters for both
提前致谢