Collection tmp = userDao.getTeachers(new UserFilter(new User(isDirected.getIdTeacher()))); course.addTeacherDirecting(tmp.toArray()[0]);
course.addTeacherDirecting(isDirected);
	public Collection getCourses(CourseFilter filter) throws RemoteException, HibernateException {	    Session session = null;        try {            session = Hibernate.getCurrentSession();            Collection c = get(TABLE_COURSE, filter, session);            UserDao userDao = UserDaoImpl.getInstance();            for (Iterator i = c.iterator(); i.hasNext(); ) {                Course course = (Course) i.next();                Set teachers = course.getTeachersDirecting();                if (teachers != null) {	                course.setTeachersDirecting(new HashSet());	                for (Iterator j = teachers.iterator(); j.hasNext(); ) {	                    IsDirectedByCourseTeacher isDirected = (IsDirectedByCourseTeacher) j.next();	                    Collection tmp = userDao.getTeachers(new UserFilter(new User(isDirected.getIdTeacher())));	                    course.addTeacherDirecting(tmp.toArray()[0]);	                }                }            }            return c;        } finally {            Hibernate.closeSession();        }	}