Many thanks, generating type of collection does work now.
A new problem is that supporting generics doesn`t work now, which actually works before in case of the sets.
First i generate mapping files through jdbc connection like this:
Code:
<hbm2hbmxml destdir="${hbm-output.dir}" templatepath="${template.dir}" />
With help of your suggested template, generated mapping fragment looks like:
Code:
<set name="persons" inverse="true">
<meta attribute="property-type">java.util.Collection</meta>
<key>
<column name="ADR_ID" precision="10" scale="0" not-null="true" />
</key>
<one-to-many class="xx.yy.zz.Person" />
</set>
After it, pojos are generated from mappings with a simple configuration:
Code:
<hbm2java destdir="${pojo-output.dir}" templatepath="${template.dir}" jdk5="true" />
Result is really nice, but generics are not inserted:
Code:
private Collection persons;
instead of:
Code:
private Collection<Person> persons;
Any well-known reason why?
cheers,
Gerald