Rohit Jain
Rohit Jain

Reputation: 159

convert oracle scripts in compatible with HSQLDB

I have a spring project using Hibernate. For dev I am using oracle as a database. But for testing purpose I am using HSQLDB. I have SQL scripts which are compatible with oracle. I want to convert those scripts compatible with HSQLDB and load the HSQLDB with those scripts to run all test cases.

Upvotes: 0

Views: 1125

Answers (1)

Ken Chan
Ken Chan

Reputation: 90427

If your existing tables in Oracle are generated by Hibernate , you can just simply change hibernate.dialect property to HSQLDB dialect (i.e org.hibernate.dialect.HSQLDialect ) and then set hibernate.hbm2ddl.auto to update or create . Then , Hibernate will automatically create the tables in the HSQLDB during its start-up.

Upvotes: 1

Related Questions