Hello again, more info now.

I now understand that the session is being flushed when I commit a transaction, 
and  that is why updates are occuring to Question objects at that point. But 
why does hibernate think that these objects are dirty? They definately 
shouldn't be.

I have implemented Audit logging using the idea suggested here:

http://209.85.229.132/search?q=cache:Wg61eqMQfGcJ:www.hibernate.org/48.html+usertype+for+audit+info+logging+site:hibernate.org&cd=1&hl=en&ct=clnk&gl=uk

Each entity that needs audit logging has the following xml in its mapping file:

  <property name="AuditInfo" 
type="BCS.QMIS.DataAccess.Hibernate.CustomTypes.AuditInfoType, QMISDataAccess">
  |       <column name="WhenAdded" />
  |       <column name="WhenUpdated"  />
  |       <column name="AddedBy"  />
  |       <column name="UpdatedBy"  />
  |     </property>
  | 

If I remove this piece of xml from the Question.hbm.xml file then stage 3 of my 
first post does not happen, ie no unwanted updates occur and the version is not 
incremented. Any ideas?

Many thanks in advance,
Jordan. 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227844#4227844

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227844
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to