map key循环
map key循环
Session s = sessionFactory.getCurrentsession();
User u = (User)s.load(User.class,1);
Group g=(Group)s.load(Group.class,1);
for(Map.Entry<Integer,User> entry:g.getUsers().entrySet()){
System.out.println(entry.getValue().getName());//获取用户名
}