All,
I have a mapping file that contains a type="int" that's generated in the Java class as an "Integer" rather than an "int":
The mapping:
<id
name="actionId"
type="int"
column="action_id">
<meta attribute="field-description">
@hibernate.id
generator-class="assigned"
type="int"
column="action_id"
</meta>
<generator class="assigned" />
</id>
The generated code:
/** identifier field */
private Integer actionId;
There are several other ints in the same mapping file that are generated as ints in the class. The one that's mapped to an Integer is an "id" in the mapping file, the others are "properties". Are id's treated differently? Is there a way to have it generate to a plain int? I'm porting some legacy code and using Integer rather than int will cause a lot of unnecessary change.
Thanks,
Steve
|