title: save method - doesn't flush the Session after an exception occurs
body: <pre><code>public class SoftwareTest extends UnitTest {
  
      @Before
      public void setup() {
          Fixtures.deleteAll(); // will fail if comment that. why?????
      }
  
      @Test
      public void createSoftwareWithNullAuthor()  {
  
         // when author is null
  
         Author nullAuthor = null;
  
         Software software = new Software("software1", "description1", nullAuthor);
         try {
           software.save();
           fail("author should not be null");
         } catch (PersistenceException ex) {
         }
  
      }
  
  
      @Test
      public void createSoftwareWithOkAuthor()  {
         // when author is ok
         Author okAuthor = new Author("author1", "email1").save(); // ERROR HERE!
  
         Software software2 = new Software("software2", "description2", okAuthor);
         Software savedSoftware = software2.save();
         assertNotNull(savedSoftware);
         assertEquals(savedSoftware, software2); 
  
         assertNotNull(savedSoftware.author);
         assertEquals(okAuthor, savedSoftware.author);
      }
  }
  </code></pre>
  
  <p>when uncomment the line with <code>Fixtures.deleteAll()</code> we will get en exception in second method - <code>createSoftwareWithOkAuthor()</code>  when <code>save()</code> the author. <strong>Why that's happened?</strong> </p>
  
  <pre><code>org.hibernate.AssertionFailure: null id in models.Software entry (don't flush the Session after an exception occurs)
    at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:82)
    at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:190)
    at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:147)
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:240)
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
  </code></pre>