With EclipseLink/JPA 2.0, I could not find a way to check the database schema upon startup. It can only create or drop and create tables.
Hibernate automatically performs schema validation when hibernate.hbm2ddl.auto=validate, and this is really cool.
Any chance to achieve this with EclipseLink?
I don't think there is a persistence.xml option for it yet (please log a bug), but you can do this through the IntegrityChecker.
Use a SessionCustomizer to configure the IntegrityChecker on the Session to check the database. It will validate the table names and columns names match the database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With