我这里有一个道路表,主键是一个number型的代理主键xh(序号),还有一个xzqh(行政区划)和dldm(道路代码)的唯一约束
另一个表是道路路口表,主键是xzqh,dldm,lddm(路段代码)的复合主键
在使用hibernate映射时,道路表的hbn.xml是配置的 xzqh,dldm为复合主键,路口表配置的是xzqh,dldm,lddm复合主键
路口表和道路表是多对一的关系,现在整个项目无法运行,异常是:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'menudao' defined in class path resource [com/config/spring-qx.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/config/spring-core.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not determine type for: Integer, at table: SG_ROADITEM, for columns: [org.hibernate.mapping.Column(xh)]我应该怎么解决?哎..纠结死了,以前的项目,大量使用复合主键,麻烦死了