The table generated has all these columns, but java file has only columns from "component" tag. The first four members are missing. In general, when I deal with "component" or for that matter other classes that are being referred, do I need to specify any additional info?
Table looks fine
===========
PROFILE_ID
PROFILE_DISPLAY_NAME
PROFILE_EMAIL
PROFILE_BIRTHDATE
initial
first
last
Mapping file
=======
<class name="com.automationschool.core.Profile" table="PROFILE">
<meta attribute="class-description">
Profile of a person (Student, Teacher, etc.)
@author Kumar Ramaiyer
</meta>
<meta attribute="generated-class">com.automationschool.core.ProfileBase</meta>
<!-- <meta attribute="implement-equals">true</meta>
<meta attribute="implement-hashcode">true</meta>
<meta attribute="scope-field">protected</meta> -->
<id name="id" type="string" unsaved-value="null" >
<column name="PROFILE_ID" sql-type="char(32)" not-null="true"/>
<generator class="uuid.hex"/>
</id>
<property column="PROFILE_DISPLAY_NAME" name="displayName" type="string">
<meta attribute="field-description">
The display name of the person.
</meta>
</property>
<property column="PROFILE_EMAIL" name="email" type="string">
<meta attribute="field-description">
The email of the person.
</meta>
</property>
<property column="PROFILE_BIRTHDATE" name="birthday" type="date">
<meta attribute="field-description">
The birthdate of the person.
</meta>
</property>
<component name="Name" class="com.automationschool.core.Name">
<property name="initial" type="string"/>
<property name="first" type="string"/>
<property name="last" type="string"/>
</component>
</class>
Generated Java
==========
package com.automationschool.core;
// Generated Feb 4, 2006 11:19:00 PM by Hibernate Tools 3.1.0.beta4
/**
* Profile of a person (Student, Teacher, etc.)
*
* @author Kumar Ramaiyer
*
*/
public class ProfileBase implements java.io.Serializable {
// Fields
private String initial;
private String first;
private String last;
// Constructors
/** default constructor */
public ProfileBase() {
}
/** full constructor */
public ProfileBase(String initial, String first, String last) {
this.initial = initial;
this.first = first;
this.last = last;
}
// Property accessors
public String getInitial() {
return this.initial;
}
public void setInitial(String initial) {
this.initial = initial;
}
public String getFirst() {
return this.first;
}
public void setFirst(String first) {
this.first = first;
}
public String getLast() {
return this.last;
}
public void setLast(String last) {
this.last = last;
}
}
|