org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
…………
…………
Caused by: org.hibernate.PropertyNotFoundException: Could not find a setter for property teachers in class com.model.Student
…………
异常意为 Student 类的 teachers 成员变量少了一个注解。teachers 是一个Set,不为数据库的字段
是因为的实体类中有一个数据库中没有的字段,需要在这个字段中加上 "@Transient" 注解
这个链接就是修改后的代码,内有注释
http://blog.youkuaiyun.com/lpy3654321/article/details/6969849
^