Incremental schema updates in Hibernate by R4R Team

The SchemaUpdate tool will update an existing schema with "incremental" changes. The SchemaUpdate depends upon the JDBC metadata API and, as such, will not work with all JDBC drivers. java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaUpdate options mapping_files

In the below table we can understand about the SchemaUpdate Command Line Options:

Option

Description

--quiet

do not output the script to stdout

--text

do not export the script to the database

--naming=eg.MyNamingStrategy

select a NamingStrategy

--properties=hibernate.properties

read database properties from a file

--config=hibernate.cfg.xml

specify a .cfg.xml file


Here we can embed SchemaUpdate in application below code:

Configuration cfg = ....;
new SchemaUpdate(cfg).execute(false);
Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in 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!