本帖最后由 spp_1987 于 2013-09-07 14:48:39 编辑

解决方案 »

  1.   

    你只用注解定义了OneToMany,没有定义manyToOne啊
      

  2.   

    嗯 我接着定义 manytoone 然后 还是会在启动的时候报出users实体类 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring-context.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.List, at table: T_User, for columns: [org.hibernate.mapping.Column(article)]
      

  3.   

    不知道你的表关系到底是什么样子的,这报的错是说你的t_user中的属性article不正确,但是你这是一对多,t_user表中不应该有article属性,你的表结构是什么样子的???
      

  4.   

    参考:http://blog.sina.com.cn/s/blog_7921902d0100yakn.html
    http://blog.sina.com.cn/s/blog_7921902d0100yakg.html