Thank you for responding back.
I thought you cannot update a primary key in update statement using hibernate, since my mapping tool generated all the column as keys.
Here is my mapping file for class.
--------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM
"hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/ http://hibernate.sourceforge.net/ -->
<class name="xxx.xxx.xxx.scrty.domain.ScrtyUser" table="SCRTY_USER" schema="SCRTY_ADMN">
<composite-id>
<key-property name="userId" column="USER_ID" type="java.lang.String" length="8" />
<key-property name="user1stName" column="USER_1ST_NAME" type="java.lang.String" length="30" />
<key-property name="userLastName" column="USER_LAST_NAME" type="java.lang.String" length="30" />
<key-property name="stusCd" column="STUS_CD" type="java.lang.String" length="1" />
<key-property name="stusDt" column="STUS_DT" type="java.sql.Timestamp" length="7" />
<key-property name="lastUpdtDt" column="LAST_UPDT_DT" type="java.sql.Timestamp" length="7" />
<key-property name="lastUpdtById" column="LAST_UPDT_BY_ID" type="java.lang.String" length="8" />
<key-property name="invldPwCnt" column="INVLD_PW_CNT" type="java.lang.Integer" length="2" />
<key-property name="lockNum" column="LOCK_NUM" type="java.lang.Long" length="16" />
<key-property name="id" column="ID" type="java.lang.Long" length="14" />
</composite-id>
<!-- associations -->
</class>
</hibernate-mapping>