求助!!关于hibernate映射的

boveysong 2012-03-23 09:10:08
我这里有一个道路表,主键是一个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)]

我应该怎么解决?哎..纠结死了,以前的项目,大量使用复合主键,麻烦死了
...全文
77 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
javamyself 2012-03-23
  • 打赏
  • 举报
回复
你贴在这帖子上就成了不是。给自己留个醒还可以方便别人。。。
boveysong 2012-03-23
  • 打赏
  • 举报
回复
问题已经找其他高人解决了....有遇到相同问题的朋友可以联系我

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧