Is there anyway for me to generate a <list> instead of a <set> tag in the hbm.xml file that gets generated using the <hbm2hbmxml > ant task ? I create a reverse engineering file which specifies the
set definition, but i really want an
ArrayList to be created eventually in the POJO file that are also exported using the mapping files. Currently if I don't manually edit the mapping files a HashSet() is created for the one-to-many relations.
Is there an easy way to achieve this? If the only way is to extend my own reverse engineering class where do I get documentation on HOW to do that. I would much prefer a simple set property in the cfg.xml file (or any other place).. or even an edit to the .ftl files (again I'll need to know HOW to do that also)
Hibernate version: 3.0
Mapping documents:
Reverse engineering file:
Code:
<table class="WorkflowUnit">
<primary-key>
<key-column name="workflow_id" />
<key-column name="workunit_id" />
</primary-key>
<foreign-key constraint-name="UToF" foreign-table="workflow" >
<column-ref local-column="workflow_id" foreign-column="workflow_id" />
<many-to-one property="workflow" exclude="false" />
<set property="workflowUnits" exclude="false" />
</foreign-key>
</table>
Above is used to generate the mapping file:
Code:
<hibernate-mapping package="...">
<class name="Workflow">
.
.
.
<set name="workflowUnits" inverse="true">
<key>
<column name="workflow_id" not-null="true" />
</key>
<one-to-many class="WorkflowUnit" />
</set>
Code between sessionFactory.openSession() and session.close():
NA
Full stack trace of any exception that occurs:
NA
Name and version of the database you are using:
NA
The generated SQL (show_sql=true):
NA
Debug level Hibernate log excerpt:
NA