1 Reply Latest reply on Sep 17, 2007 12:12 AM by Joshua Jackson

    Expert needed:getEntityManager().flush() ignored

    Kim Lord Newbie

      I have the following in an entityhome class and am finding that the flush does not cause the record to be written to the database. The record gets written when the method ends. I need the flush to work so that the other method called moveTempRecord() can do some post processing.

      @In EntityManager entityManager;
       @Transactional
       public String persist() {
       log.info("Override persist");
       getEntityManager().joinTransaction();
       getEntityManager().persist( getInstance() );
       getEntityManager().flush();
       moveTempRecord();
       return "success";
       }


      Thanks for helping,
      Kim