I use Hibernate3 and Hibernate Tools 3.2.4 to generate hbm.xml and java files and I want to use List instead of HashSet(...). I've tried to modify the hbm.xml files, putting list instead of set. Is there any way to specify to hibernate tools that I want to generate automatically a list not a HashSet? This is an exemple:
Java class
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>
I thought that I could find a clue in the "reveng.xml" file, but I failed.