Here is the output from my console. As far as isolating the save with new Employee and new Employment, I'm not able to do this easily as there are many required fields and in the end it will end up looking the same as what I have below. FYI - I also have the parameters being written to the log to give additional detail.
Thank you for your help.
Code:
Hibernate: select employee_.EMPLOYEE_ID, employee_.SUPERVISOR_ID as SUPERVISOR2_1_, employee_.FIRST_NAME as FIRST3_1_, e
mployee_.MIDDLE_NAME as MIDDLE4_1_, employee_.LAST_NAME as LAST5_1_, employee_.EMAIL as EMAIL1_, employee_.ADDED_BY as A
DDED7_1_, employee_.ADDED_AT as ADDED8_1_, employee_.CHANGED_BY as CHANGED9_1_, employee_.CHANGED_AT as CHANGED10_1_ fro
m ABCMSTR.EMPLOYEE employee_ where employee_.EMPLOYEE_ID=?
2009-03-18 13:56:59,270 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'SAD0001' to parameter: 1
Hibernate: insert into ABCMSTR.EMPLOYEE (SUPERVISOR_ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME, EMAIL, ADDED_BY, ADDED_AT, C
HANGED_BY, CHANGED_AT, EMPLOYEE_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2009-03-18 13:56:59,280 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding null to parameter: 1
2009-03-18 13:56:59,290 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'Sherry' to parameter: 2
2009-03-18 13:56:59,300 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'Ann' to parameter: 3
2009-03-18 13:56:59,300 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'Smith' to parameter: 4
2009-03-18 13:56:59,310 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'craig.smith@public.com' to parameter: 5
2009-03-18 13:56:59,320 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'craigssmith' to parameter: 6
2009-03-18 13:56:59,330 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding '18 March 2009' to parameter: 7
2009-03-18 13:56:59,330 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'craigssmith' to parameter: 8
2009-03-18 13:56:59,340 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding '18 March 2009' to parameter: 9
2009-03-18 13:56:59,350 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'SAD0001' to parameter: 10
Hibernate: update WEBTIME.EMPLOYMENT set PAYROLL_ID=?, EXEMPT=?, HIRE_DATE=?, TERMINATE_DATE=?, ADDED_BY=?, ADDED_AT=?,
CHANGED_BY=?, CHANGED_AT=? where EMPLOYEE_ID=?
2009-03-18 13:56:59,360 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'SAD0001' to parameter: 1
2009-03-18 13:56:59,370 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'false' to parameter: 2
2009-03-18 13:56:59,380 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding '01 March 2009' to parameter: 3
2009-03-18 13:56:59,390 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding null to parameter: 4
2009-03-18 13:56:59,390 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'craigssmith' to parameter: 5
2009-03-18 13:56:59,400 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding '18 March 2009' to parameter: 6
2009-03-18 13:56:59,410 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'craigssmith' to parameter: 7
2009-03-18 13:56:59,420 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding '18 March 2009' to parameter: 8
2009-03-18 13:56:59,420 TRACE: [org.apache.commons.logging.impl.Log4JLogger]
binding 'SAD0001' to parameter: 9
2009-03-18 13:56:59,430 ERROR: [org.apache.commons.logging.impl.Log4JLogger]
Exception executing batch:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expe
cted: 1
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)