I'm using Hibernate tool 3.0.0 alpha 4.
This is my hbm.
Code:
<hibernate-mapping>
<class name="it.dp.magazzino.hibernate.XXX"
table="XXX">
<meta attribute="generated-class" inherit="false">it.dp.magazzino.hibernate.AbstractXXX</meta>
<meta attribute="scope-class">public abstract</meta>
<id name="id" type="long" unsaved-value="null">
<generator class="increment" />
</id>
<property name="login" type="string" not-null="true" length="30" />
<property name="password" type="string" not-null="true" length="30" />
<property name="name" type="string" length="30" />
<property name="age1" type="integer" length="3"/>
<property name="age2" type="integer" length="3" not-null="true"/>
<property name="age3" type="int" length="3" not-null="true"/>
</class>
</hibernate-mapping>
The generated code is:
Code:
public abstract class AbstractXXX implements java.io.Serializable {
// Fields
private Long id;
private String login;
private String password;
private String name;
private Integer age1;
private Integer age2;
private Integer age3;
// Constructors
/** default constructor */
public AbstractXXX() {
}
/** constructor with id */
public AbstractXXX(Long id) {
this.id = id;
}
:
:
Why the fiels age1, age2 and age3 is all Integer instead primitive "int" type?
I would have expected that only age1 is Integer type.
Thanks.
Gianni