I am using Hibernate 2.1 beta 5
SQL Generated:
Hibernate: select customer0_.icNo as icNo, customer0_.programId as programId, customer0_.firstName as firstName, customer0_.middleName as middleName, customer0_.lastName as lastName, customer0_.nickName as nickName, customer0_.gender as gender, customer0_.birthdate as birthdate, customer0_.joinDate as joinDate, customer0_.updateDate as updateDate, customer0_.emailAddr as emailAddr, customer0_.race as race, customer0_.addr1 as addr1, customer0_.addr2 as addr2, customer0_.addr3 as addr3, customer0_.state as state, customer0_.postcode as postcode, customer0_.country as country, customer0_.city as city, customer0_.password as password, customer0_.userCanChangePassword as userCan21_, customer0_.changePasswordAtLogon as changeP22_, customer0_.expiryDate as expiryDate from userMgt_model_CustomerDO customer0_ where (icNo='902329-14-5555' )AND(programId='1' )
Hibernate: select usermgt_0_.number as number__, usermgt_0_.icNo as icNo__, usermgt_0_.programId as programId__ from userMgt_model_CustomerDO_Handphone usermgt_0_ where usermgt_0_.icNo=? and usermgt_0_.programId=?
The full mapping file is:
<hibernate-mapping>
<class name="com.alfacom.loyalty.userMgt.model.CustomerDO"
table="userMgt_model_CustomerDO">
<composite-id unsaved-value="any">
<key-property name="icNo" column="icNo" type="string"/>
<key-property name="programId" column="programId" type="string" length="10"/>
</composite-id>
<set name="handphone" table="userMgt_model_CustomerDO_Handphone" lazy="false" outer-join="true">
<key>
<column name="icNo"/>
<column name="programId" length="10"/>
</key>
<element column="number" length="20" unique="true" type="string"/>
</set>
<property name="firstName" column="firstName" type="string"/>
<property name="middleName" column="middleName" type="string"/>
<property name="lastName" column="lastName" type="string"/>
<property name="nickName" column="nickName" type="string"/>
<property name="gender" column="gender" type="string"/>
<property name="birthdate" column="birthdate" type="timestamp"/>
<property name="joinDate" column="joinDate" type="timestamp"/>
<property name="updateDate" column="updateDate" type="timestamp"/>
<property name="emailAddr" column="emailAddr" type="string"/>
<property name="race" column="race" type="string"/>
<property name="addr1" column="addr1" type="string"/>
<property name="addr2" column="addr2" type="string"/>
<property name="addr3" column="addr3" type="string"/>
<property name="state" column="state" type="string"/>
<property name="postcode" column="postcode" type="string"/>
<property name="country" column="country" type="string"/>
<property name="city" column="city" type="string"/>
<component class="com.alfacom.loyalty.userMgt.model.Password" name="password" insert="true" update="true">
<property column="password" name="password" type="string"/>
<property column="userCanChangePassword" name="userCanChangePassword" type="boolean"/>
<property column="changePasswordAtLogon" name="changePasswordAtLogon" type="boolean"/>
<property column="expiryDate" name="expiryDate" type="timestamp"/>
</component>
</class>
</hibernate-mapping>
|