title: org.hibernate.AssertionFailure: Unable to perform un-delete for instance
body: <p>I am getting this hibernate assertion error, when i try to make a read after some delete operations.</p>
  
  <p>I couldn't find anything regarding this ' Unable to perform un-delete' error, <a href="https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java" rel="nofollow">except the soure code</a>, so i think that, maybe i am doing something so obviously wrong...</p>
  
  <p>The stack trace is below,</p>
  
  <pre><code>AssertionFailure:43 -  - HHH000099: an assertion failure occured (this may indicate a bug in         Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: Unable     to perform un-delete for instance X
  org.hibernate.AssertionFailure: Unable to perform un-delete for instance X
     at org.hibernate.engine.spi.ActionQueue.unScheduleDeletion(ActionQueue.java:508)
     at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:157)
     at org.hibernate.internal.SessionImpl.firePersistOnFlush(SessionImpl.java:870)
     at org.hibernate.internal.SessionImpl.persistOnFlush(SessionImpl.java:863)
     at org.hibernate.engine.spi.CascadingAction$8.cascade(CascadingAction.java:346)
     at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:380)
     at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)
     at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:208)
     at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:165)
     at org.hibernate.event.internal.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:423)
     at org.hibernate.event.internal.DefaultPersistEventListener.justCascade(DefaultPersistEventListener.java:190)
     at org.hibernate.event.internal.DefaultPersistEventListener.entityIsDeleted(DefaultPersistEventListener.java:229)
     at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:158)
     at org.hibernate.internal.SessionImpl.firePersistOnFlush(SessionImpl.java:870)
     at org.hibernate.internal.SessionImpl.persistOnFlush(SessionImpl.java:863)
     at org.hibernate.engine.spi.CascadingAction$8.cascade(CascadingAction.java:346)
     at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:380)
     at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)
     at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:208)
     at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:165)
     at org.hibernate.event.internal.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:423)
     at org.hibernate.event.internal.DefaultPersistEventListener.justCascade(DefaultPersistEventListener.java:190)
     at org.hibernate.event.internal.DefaultPersistEventListener.entityIsPersistent(DefaultPersistEventListener.java:183)
     at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:147)
     at org.hibernate.internal.SessionImpl.firePersistOnFlush(SessionImpl.java:870)
     at org.hibernate.internal.SessionImpl.persistOnFlush(SessionImpl.java:863)
     at org.hibernate.engine.spi.CascadingAction$8.cascade(CascadingAction.java:346)
     at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:380)
     at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)
     at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:208)
     at org.hibernate.engine.internal.Cascade.cascadeCollectionElements(Cascade.java:409)
     at org.hibernate.engine.internal.Cascade.cascadeCollection(Cascade.java:350)
     at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:326)
     at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:208)
     at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:165)
     at org.hibernate.event.internal.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:160)
     at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:151)
     at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88)
     at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
     at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1186)
     at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1241)
     at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
     at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:257)
     at org.hibernate.ejb.criteria.CriteriaQueryCompiler$3.getResultList(CriteriaQueryCompiler.java:254)
  </code></pre>
  
  <p>Regards,</p>