-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Kalle Korhonen opened SPR-3212 and commented
There's create-, drop- and updateDatabaseSchema() operations in LocalSessionFactoryBean. For completeness, add validateDatabaseSchema(). This is useful if your application doesn't have permissions to modify the schema itself. If using hibernate, one cannot auto-validate the scema in a webapplication because context loading would fail with HibernateException if schema has changed, so the application would need to validate the schema at a later point. You could also consider adding a strategy for supporting hibernate.hbm2ddl.auto=validate.
In Hibernate, schema validation can be performed with:
SchemaValidator validator = new SchemaValidator(configuration);
validator.validate();
Thread this is discussed:
http://forum.springframework.org/showthread.php?t=35274
Affects: 2.0.2
Referenced from: commits b370969
3 votes, 3 watchers