Affects Version/s: 5.2.1
Fix Version/s: None
MySQL 5.5.27 on a Win7 VM
Bug Testcase Reminder (view):
Last commented by a user?:true
we have some projects created with Hibernate 4. At moving them to Hibernate 5.2.1 we run into a problem with Mysql databases:
When the @Table name of an Entity is set to a quoted String like in the following example,
the table can be created with hibernate.
But when"javax.persistence.schema-generation.database.action" or "hibernate.hbm2ddl.auto" is set to "validate", it doesn't know the table any more.
In the example project, the database table for this entity is created at first application start with hibernate's schema generation without problems:
After switching this property to
now building the EntityManagerFactory/Sessionfactory fails, because schema validation doesn't find this table any more.
With Hibernate 4.3, validation works for such entities.