nmadhire / jwpl

Automatically exported from code.google.com/p/jwpl
0 stars 0 forks source link

Hibernate hbm2ddl policy should be "verify" instead of "update" #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
JWPL doesn't use hibernate to generate the database schema. It's set up during 
the import of the SQL file that JWPL generates. Thus, hibernate should be able 
to operate in a pure read-only mode. This includes verifying the database 
schema against the Hibernate mappings, but not trying to update the DB.

hibernate.hbm2ddl.auto=validate

Original issue reported on code.google.com by richard.eckart on 17 Jul 2011 at 10:54

GoogleCodeExporter commented 9 years ago
Fixed in revision 228 of WikiHibernateUtil

Original comment by oliver.ferschke on 18 Jul 2011 at 8:38

GoogleCodeExporter commented 9 years ago
Reopened.
I have reverted the changes made in revision 228 due to some unforeseen side 
effects.
Upon first access, the API attaches the version meta data to the db.
This needs update rights.
Later on, the API can be used with read only rights.

Original comment by oliver.ferschke on 25 Jul 2011 at 8:43

GoogleCodeExporter commented 9 years ago
Shouldn't the version metadata be generated into the SQL code that is imported 
into the DB? Sounds like if you access the DB with version B while the SQL was 
generated with version A, then version B would be saved as the version 
metadata, while version A would be correct.

Original comment by richard.eckart on 25 Jul 2011 at 9:15