<entity-manager> <name>articles</name> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/articles</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> <property name="hibernate.case.use_query_cache">true</property> <property name="hibernate.show_sql">false</property> <property name="hibernate.hbm2ddl.auto">create</property> <property name="hibernate.connection.datasource" value="java:/articles"/> </properties> </entity-manager>
How on earth did you find out about adding that line? An old Hibernate hand?
Updating to the 3.1.X driver also did it. However, there is now another problem. Tables are created and entries persisted, but on restarting the server the table is empty again. No doubt the SQL code generated to create the tables check for table existence (if exists), drops them if they exist and recreates them.
This is of course a serious problem. One would be very unhappy in a production environment if the server goes down and all tables are empty on restart. Another argument in favour of a back-up protocol.
I'll post on this one and see what comes up.