title: hibernate is not in sync with my database
body: <pre><code>  @PersistenceContext(unitName = "ServerLayerPU")
    protected EntityManager m_entityManager;
  
     m_entityManager.persist(entity);
     m_entityManager.flush();
  </code></pre>
  
  <p>I am trying to get my new entity object to be in sync with what has been committed to the db.  I originally put in flush which I thought solved the problem but the problem has reappeared during greater testing.  When this entity is committed to the db, triggers occur that affect another table/entity and I need this to be reflected.  How should I go about this?</p>