1 Reply Latest reply on Apr 30, 2007 9:30 AM by chris worley

    Hibernate sets FK to null

    chris worley Newbie


      Hey,

      Having a problem with updating my OrderHeader object. In the logs hibernate updates the collections then it appears it makes a second pass through all the collections and sets the fk to null.

      Any idea why this behavior would occur?

      -chris worley

      2007-04-30 08:43:36,985 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggressive-release due to flush cycle
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister] Deleting collection: [com.remitdata.referralpro.common.model.order.OrderHeader.formFieldValues#180]
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.SQL] update form_field_value set order_id=null where order_id=?
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.type.IntegerType] binding '180' to parameter: 1
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.jdbc.AbstractBatcher] Adding to batch
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister] done deleting collection
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister] Deleting collection: [com.remitdata.referralpro.common.model.order.OrderHeader.orderAttachments#180]
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.jdbc.AbstractBatcher] Executing batch size: 1
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
      2007-04-30 08:43:36,985 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement