I would like to see what hibernate is doing in order to determine what specifically is breaking in my code.
Hibernate version:
2
I am getting this exception
Quote:
Caused by: org.springframework.orm.hibernate.HibernateSystemException: a different object with the same identifier value was already associated with the session: 1165, of class: com.*****.model.businessobject.ServiceJobCrane; nested exception is net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 1165, of class: com.*****.model.businessobject.ServiceJobCrane
..
Caused by: net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 1165, of class: com.*****.model.businessobject.ServiceJobCrane
I'm assuming my constraint
Code:
<set name="cranes" lazy="false" inverse="true"
order-by="ServiceJobCraneID_PK" cascade="all-delete-orphan" >
<key column="ServiceJobID_FK" foreign-key="ServiceJobID_FK" />
<one-to-many
class="com.wolverinecrane.model.businessobject.ServiceJobCrane" />
</set>
is not allowing me to write over insert ,delete or update .(IT appears to crash on a hibernatetemplate.saveorupdate function and I am unable to debug through the hibernate code )
I would like to specify log4j to only show updates,inserts or deletes.
In log4j.properties I have the following:
Quote:
log4j.logger.net.sf.hibernate.SQL=INFO, wolvLog
If I change this to Debug and I tail the log I see all the
Select Statements. I would like to see everything but the
Select Statements. Is there an easy way to do this in log4j. I have been scouring google but I have not found a similar request anywhere on the web.
SQL Profiler for MSSQL spits out a bunch of junk whenever hibernate is called, else I would use that to discover what might be going wrong.