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?
With EclipseLink/JPA 2.0, I could not find a way to check the database schema
Share
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.