Schema validation in Hibernate by R4R Team

The SchemaValidator tool will validate that the existing database schema "matches" your mapping documents. The SchemaValidator depends heavily upon the JDBC metadata API and, as such, will not work with all JDBC drivers. This tool is extremely useful for testing. java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaValidator options mapping_files

By the help of the below Table of SchemaValidator Command Line Options is given:




select a NamingStrategy

read database properties from a file


specify a .cfg.xml file

We can embed SchemaValidator in application as code is given below:

Configuration cfg = ....;
new SchemaValidator(cfg).validate();
Leave a Comment:
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!