Hibernate version:3.2.1.ga
Mapping documents:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.countrywide.loanadmin.ace.creditreporting.cushionpolicy.domain">
<class name="AuditLogImpl" table="MET2DLOGF0">
<id name="id" column="ID" type="long" access="field">
<generator class="native"/>
</id>
<property name="customerAccountNumber" column="ACCTNUM" type="long" access="field"/>
<property name="reportingPeriodDate" column="RPTPER" type="long" access="field"/>
<property name="orgMostRecentPaymentRating" column="ORGPRAT" type="string" access="field"/>
<property name="chgMostRecentPaymentRating" column="CHGPRAT" type="string" access="field"/>
<property name="orgAccountStatus" column="ORGSTAT" type="string" access="field"/>
<property name="chgAccountStatus" column="CHGSTAT" type="string" access="field"/>
<property name="orgPastDueAmount" column="ORGPSDU" type="big_decimal" access="field"/>
<property name="chgPastDueAmount" column="CHGPSDU" type="big_decimal" access="field"/>
<property name="orgFcraDate" column="ORGFCRA" type="string" access="field"/>
<property name="chgFcraDate" column="CHGFCRA" type="string" access="field"/>
<property name="dateUpdated" column="LSTCHGDTTM" type="calendar" access="field"/>
<property name="updatedBy" column="LSTCHGUSER" type="string" access="field"/>
<sql-insert callable="true" check="none">
{ call ACESP5(?,?,?,?,?,?,?,?,?,?,?,?) }
</sql-insert>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():(Long)sessionFactory.getCurrentSession().save(auditLog);
Name and version of the database you are using:as400 database V5R3
Code:
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.ibm.as400.access.AS400JDBCDriver" />
<property name="url" value="jdbc:as400://AS400DEV;naming=system;" />
<property name="username" value="tosborne" />
<property name="password" value="xxxxxxxxxx" />
</bean>
When I look at the log files, it shows Hibernate performing it's own INSERT statement instead of calling my stored procedure.
I read the chapter 8 page 361 in the Java Persistance with Hibernate(great book by the way).
Am I missing something?