title: Can't see any data in h2 database
body: <p>I got some unit test that stores some <code>Person</code> data into the database. To do this i use the <code>EntityManagerFactory</code>.</p>
  
  <pre><code>@Test
  public void findPersonById() {
      personDao.savePerson(new Person("Hans"));
      Person person = new Person("Peter");
      personDao.savePerson(person);
      Long id = person.getId();
      flushAndClear();
  
      person = personDao.findById(id);
      assertThat(person.getName(), is("Peter"));
  }
  </code></pre>
  
  <p>where </p>
  
  <pre><code>private EntityManager entityManager;
  
  public Person savePerson(Person person) {
      entityManager.persist(person);
      return person;
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public Person findById(Long id) {
      Person person = entityManager.find(Person.class, id);
      return person;
  }
  </code></pre>
  
  <p>with this Base-Test-class</p>
  
  <pre><code>import javax.persistence.EntityManager;
  import javax.persistence.Persistence;
  
  import org.junit.After;
  import org.junit.Before;
  
  public class AbstractDaoTest {
  
      protected EntityManager entityManager = Persistence.createEntityManagerFactory("DefaultPersistenceUnit")
          .createEntityManager();
  
      protected PersonDao personDao = new PersonDao();
  
      @Before
      public void setUp() {
          personDao.setEntityManager(entityManager);
          entityManager.getTransaction().begin();
      }
  
      @After
      public void tearDown() {
          entityManager.getTransaction().rollback();
      }
  
      protected void flushAndClear() {
          entityManager.flush();
          entityManager.clear();
      }
  }
  </code></pre>
  
  <p>My unit test runs green but when i debug this test, i can't see any data on the db (using squirrel). It doesn't matter in which step the debugger currently is, the Tables are always empty. I am using the following configuration for squirrel:</p>
  
  <pre><code>jdbc:h2:file:~/test;DB_CLOSE_DELAY=-1;LOCK_MODE=0;AUTO_SERVER=TRUE
  with Driver: H2
  </code></pre>
  
  <p>Can you help with this issue?</p>