oohave / rapid-framework

Automatically exported from code.google.com/p/rapid-framework
0 stars 0 forks source link

hibernate 3.X 集合类型批注(@oneTomany..) 使用Set会导致Bug? #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
经多次测试 发现如下Bug
对于一对多(oneToMany ) ,rapid-framework  自动生成代码的都 
采用java.util.Set.
但是hibernate 3.X 集合类型批注(@oneTomany..) 使用Set会导致Bug
在延迟加载时候,只能导致读取子表(一对多的 "多" 
所对于的表)一条记录,这可能是
hibernate Bug!

建议:将模板的java.util.Set 修正为 java.util.List or 
java.util.Collection!

Original issue reported on code.google.com by qiquan...@gmail.com on 23 Nov 2009 at 5:12

GoogleCodeExporter commented 8 years ago
同样也遇到这样的问题。@OneToMany的集合,size只有一个。

Original comment by linle...@gmail.com on 1 Dec 2010 at 9:16