写了一个普通测试方法
  Session session = HibernateUtil.getSessionfactory().openSession();  session.beginTransaction();  session.setFlushMode(FlushMode.MANUAL);  Customer customer = new Customer();
  session.save(customer);

  session.getTransaction().commit();
  session.close();
 FlushMode.MANUAL 不是要明确手动调用session.flush(); 才会将缓存与数据库关联,持久化吗? 为何每次执行都向数据库插入数据呢? FlushMode.NEVER 也不管用。 是不是我哪里出错了。 希望指点一下