title: @PostPersist not called... @PrePersist is... why?
body: <p>I have a JPA @Entity class which uses a @PrePersist for quite a while now. Today I wanted to add some functionality where I need the ID of that entity. This ID is generated during persist by a HIBERNATE_SEQUENCE in the database. It is usually set <strong>after</strong> em.persist(entity).</p>
  
  <p>For some unknown reason the <strong>@PrePersist</strong> method is triggered... while <strong>@PostPersist</strong> simply never fires:</p>
  
  <pre><code>@Entity
  public class MyEntity {
  
      @PrePersist
      protected void onCreate() {
          System.out.println("ExtendedEntity.onCreate()");
      }
  
      @PostPersist
      protected void afterCreate() {
          System.out.println("ExtendedEntity.afterCreate()");
      }
  }
  </code></pre>
  
  <p>I'm using a JBoss v4.2 environment with Java v7+, Hibernate v3.3.1.GA and Seam v2.2.2.Final...</p>
  
  <p><em>Are there any hidden requirements for @PostPersist to fire?</em></p>