Select multiple hibernate import.sql depending on the conditions

How to specify the import file I want to run hibernate. Is there a configuration option I can put (I think I have seen something similar somewhere) I can say custom. sql file and hibernate will run it.

I want to split my creation into multiple files. And I also want to run different scripts which will generate the date based on the hibernate configuration I am using So if I use local, it should be a set of .sql files, if I test it to QA, it should use another one.

I have multiple configuration files, I can Need to run, so now I need to figure out how to run which script in which configuration.

Cheers

‘hibernate.hbm2ddl.import_files’ is the setting you want (org.hibernate.cfg.AvailableSettings#HBM2DDL_IMPORT_FILES).

http://docs.jboss.org /hibernate/orm/4.1/javadocs/org/hibernate/cfg/AvailableSettings.html#HBM2DDL_IMPORT_FILES

How to specify the import files I want to run hibernate. Is there any I can Placed configuration options (I think I have seen something similar somewhere) I can say that the custom .sql file and hibernate will run it.

I want to divide my creation into multiple Files. And I also want to run different scripts that will generate the date based on the hibernate configuration I am using. So if I use local, it should be a set of .sql files, if I test it to QA, it Should use another one.

I have multiple configuration files that I can run according to my needs, so now I need to figure out how to run which script in which configuration.

Cheers

‘hibernate.hbm2ddl.import_files’ is the setting you want (org.hibernate.cfg.AvailableSettings#HBM2DDL_IMPORT_FILES).

http://docs.jbo ss.org/hibernate/orm/4.1/javadocs/org/hibernate/cfg/AvailableSettings.html#HBM2DDL_IMPORT_FILES

Leave a Comment

Your email address will not be published.