首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Hibernate 多对1的 实现

2012-10-27 
Hibernate 多对一的 实现在一对多的问题中遇到Exception 如下:开始测试的时候,没有注意类型要一致,用了Lis

Hibernate 多对一的 实现
在一对多的问题中遇到Exception 如下:


开始测试的时候,没有注意类型要一致,用了List类型,结果就出现了
org.hibernate.exception.SQLGrammarException: could not initialize a collection

在Department中 尽量不用List作为集合的类型,原因如下:
lists are indexed collections and therefor need a index column

热点排行