Hi I am pasting my hbm file here
**********************************************************
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.capco.ortos.orap.model.Action" table="A1_Action" lazy="true">
<id name="id" column="Id" type="java.lang.Long">
<generator class="sequence">
<param name="sequence">A_SEQ_ACTIONS</param>
</generator>
</id>
<property name="issueId" column="FK_ISSUE" type="string"/>
<property name="assessor" column="FK_ASSESSOR" type="string"/>
<property name="assessorDelegate" column="FK_ASSESSOR_DELEGATE" type="string"/>
<property name="priority" column="FK_PRIORITY" type="string"/>
<property name="type" column="FK_TYPE" type="string"/>
<property name="name" column="NAME" type="string"/>
<property name="description" column="DESCRIPTION" type="string"/>
<property name="captureDate" column="CAPTURE_DATE"/>
<property name="targetCompletionDate" column="TARGET_COMPLETION_DATE" />
<property name="targetReviewDate" column="TARGET_REVIEW_DATE" />
<property name="cost" column="COST" type="string"/>
<property name="estimatedCost" column="ESTIMATED_COST" type="string"/>
<property name="actionReviewed" column="ACTION_IS_REVIEWED" type="string"/>
<property name="percentComplete" column="PERCENT_COMPLETE" type="string"/>
<property name="reminder" column="REMINDER" type="string"/>
<property name="tasksAlreadyTaken" column="TASKS_ALREADY_TAKEN" type="string"/>
<property name="comment" column="COMMENT_GENERAL" type="string"/>
<property name="mileStone" column="IS_MILESTONE" type="string"/>
<property name="lastUpdateUser" column="LAST_CHANGE_USER" type="string"/>
<property name="currency" column="FKQ_CURRENCY" type="string"/>
<property name="revisedTargetComment" column="REVISED_TARGET_COMMENT" type="string"/>
<set name="attachment" inverse="true" cascade="delete">
<key column="FK_ACTION"/>
<one-to-many class="com.capco.ortos.orap.model.ActionAttachment"/>
</set>
<sql-insert>
insert into A1_Action
(FK_ISSUE, FK_ASSESSOR, FK_ASSESSOR_DELEGATE, FK_PRIORITY,
FK_TYPE, NAME, DESCRIPTION, CAPTURE_DATE, TARGET_COMPLETION_DATE, TARGET_REVIEW_DATE,
COST, ESTIMATED_COST, ACTION_IS_REVIEWED,
PERCENT_COMPLETE, REMINDER, TASKS_ALREADY_TAKEN, COMMENT_GENERAL, IS_MILESTONE,
LAST_CHANGE_USER, FKQ_CURRENCY, Id) values (?, ?, ?, ?, ?, ?, ?, to_date(?,'YYYY.MM.DD'), to_date(?,'YYYY.MM.DD'), to_date(?,'YYYY.MM.DD'), ?, ?,?, ?, ?, ?, ?, ?, ?, ?, ?)
</sql-insert>
<sql-update>
update A1_Action set FK_ISSUE=?, FK_ASSESSOR=?, FK_ASSESSOR_DELEGATE=?, FK_PRIORITY=?, FK_TYPE=?,
NAME=?, DESCRIPTION=?, CAPTURE_DATE=to_date(?,'YYYY.MM.DD'), TARGET_COMPLETION_DATE=to_date(?,'YYYY.MM.DD'),
TARGET_REVIEW_DATE=to_date(?,'YYYY.MM.DD'), COST=?, ESTIMATED_COST=?, ACTION_IS_REVIEWED=?,
PERCENT_COMPLETE=?, REMINDER=?, TASKS_ALREADY_TAKEN=?, COMMENT_GENERAL=?, IS_MILESTONE=?, LAST_CHANGE_USER=?,
FKQ_CURRENCY=? where Id=?
</sql-update>
</class>
</hibernate-mapping>
*********************************************************
And calling through
Session session = HibernateSession.currentSession();
if (action.isUpdateFlag()) {
session.update(action);
where action is the info object
******************************************************
also getting error like
11:27:32,976 WARN [JDBCExceptionReporter] SQL Error: 1747, SQLState: 42000
11:27:32,976 ERROR [JDBCExceptionReporter] ORA-01747: invalid user.table.column, table.column, or column specification
11:27:32,976 WARN [JDBCExceptionReporter] SQL Error: 1747, SQLState: 42000
11:27:32,976 ERROR [JDBCExceptionReporter] ORA-01747: invalid user.table.column, table.column, or column specification
11:27:32,992 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
|