title: org.hibernate.TransientObjectException: object references an unsaved transient instance
body: <p>Hi all currently I'm using Hibernate  4.1.5 , i tried in different ways. But I'm unable to resolve the issue.
  Because of this issue my production server becomes hanging.</p>
  
  <p>Any help would be great. Thanks!</p>
  
  <h2>ISSUE DESCRIPTION:</h2>
  
  <p>Trying to rollback database transaction after exception</p>
  
  <pre><code>org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing:
   omegon.bo.exam.ExamQuestionAttemptBO
          at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:249)
          at org.hibernate.type.EntityType.getIdentifier(EntityType.java:459)
          at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:276)
  :
  </code></pre>