TeacherEntity teacher = new TeacherEntity();
teacher.setName("路飞");
teacher.setPic("upload/Teacher/pic3345280233.PNG");
course.setTeacher(teacher);
List<StudentEntity> list = new ArrayList<StudentEntity>();
StudentEntity student = new StudentEntity();
student.setName("卓洛");
student.setSex("0");
list.add(student);
student = new StudentEntity();
student.setName("山治 ");
student.setSex("0");
list.add(student);
course.setStudents(list);
commonDao.save(course.getTeacher());
commonDao.save(course);
commonDao.save(course);