How to check that Hibernate mapping configuration matches database? I'd like know if I am using wrong version of hibernate mapping before I start executing update and queries, which then would fail.
I have bunch of classes that have been mapped with Hibernate annotations. I also have connection to corresponding database. Now I'd like to check if Hibernate mapping matches the database.
I'd like to check at least following things:
- all mapped tables in Hibernate configuration have corresponding object in database (e.g table or view)
- all mapped fields exist in database
- all mapped fields have correct types
I'd prefer that I do not have to execute queries to mapped tables, preferably the check is based solely on database meta data.