Add flushes in the controller template for the Hibernate4 plugin.