No i am not assining alertid ,the alertid is coming from a database sequnce,
i just modifed my child xml as
<id name="intelliAgentAlertId" type="long">
<column name="ALERTID" sql-type="number" not-null="true"/>
<generator class="sequence"> <param name="sequence">IA_ALERTID</param>
</generator>
</id>
ANd get the Hibernate debug as :
Hibernate: select IA_CONTROLAGENTID.nextval from dual
Hibernate: insert into IA_CONTROLAGENT (CONTROLAGENTNAME, CONTROLAGENTDESC, DEFAULTALERTSUBJECT, DEFAULTALERTTEMPLATE, status, lastUpdateUserId, lastUpdateTimestamp, createUserId, domainName, LASTEXECUTEDTIME, CONTROLAGENTID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: update IA_ALERT set CONTROLAGENTID=?, ALERTTYPECODE=?, ALERTTARGET=?, ALERTSUBJECT=?, ALERTTEMPLATE=?, PRIORITY=?, ALLOWRICHTEXT=?, USEDEFAULTS=?, status=?, lastUpdateUserId=?, lastUpdateTimestamp=?, createUserId=?, createTimestamp=?, domainName=? where ALERTID=?
I don't understand y hibernate is not inserting IA_ALERT record first.
i have done show-sql true ,is there is other verbose option avilable for debugging hibernate.
Thanks for reply