1
我目前正在努力学习hibernate,它正在进行中,但我在这里碰到了一些路障。列表。休眠列表
基本上,我目前正试图扩展Parent/Child example from the manual,因此它使用索引列表而不是集合。
我猜测(因为手工真的不提供这方面的很多材料),我需要这样的:
<list name="benefits" table="Child">
<key column="ParentId"/>
<list-index column="position"/>
<one-to-many class="ChildClass"/>
</list>
,但它不工作
初始SessionFactory的创建 失败.org.hibernate.InvalidMappingException:无法读取XML
我无法做到这一点,我想知道wha正确的做法是什么?有人可以在这里提示我吗?我是否将SET元素放置在映射文件中的LIST元素中?
任何错误显示?你怎么知道它不工作? – Tom
“Initial SessionFactory creation failed.org.hibernate.InvalidMappingException:Unable to read XML”,映射文件在使用SET元素而不是上述引用列表时正常工作。 – JustDanyul