1
我使用Hibernate3和Hibernate Tools 3.2.4来生成hbm.xml和java文件,我想使用List而不是HashSet(...)。我试图修改hbm.xml文件,放置列表而不是set。有什么办法来指定休眠工具,我想自动生成一个列表不是一个HashSet? 这是个例:更改休眠3设置
Java类
public class Test implements java.io.Serializable {
private Long testId;
private Course course;
private String testName;
private Set<Question> questions = new HashSet<Question>(0);
}
Test.hbm.xml:
<set name="questions" inverse="true" lazy="true" table="questions" fetch="select">
<key>
<column name="test_id" not-null="true" />
</key>
<one-to-many class="com.app.objects.Question" />
...
</set>
我认为我能找到的 “reveng.xml” 文件线索,但我失败了。