You can use the IntegrityChecker in EclipseLink for this, you will need to configure it using a SessionCustomizer,
See,
http://www.eclipse.org/eclipselink/api/1.1.1/org/eclipse/persistence/sessions/Session.html#getIntegrityChecker()
checkDatabase() will make it check the mappings against the database.
Krohn wrote:
Hi,
I have a database which is accessed by old client/server apps besides JPA/EclipseLink. My JPA app can't update database schema. How can I use EclipseLink to just report schema inconsistences with my entities? I want to write an app that reports a system administrator tables and columns missing.
Any ideas?