title: why after Hibernate4 save() the database will change?
body: <p>why after execute such code without <code>flush()</code>,database will change?</p>
  
  <pre><code>public static void main(String args[]){
  
  ApplicationContext ac = new FileSystemXmlApplicationContext("src/main/resources/config/spring/spring-common.xml");
  
  SessionFactory sessionFactory = (SessionFactory)ac.getBean("sessionFactory");
  
  Session session = sessionFactory.openSession();
  
  Student student = new Student();
  
  student.setName("zyc");
  
  session.save(student);
  }
  </code></pre>
  
  <p>I use this class to create sessionFactory.</p>
  
  <pre><code>&lt;bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
  </code></pre>