No problem, you must edit the hibernate configuration file (hibernate.cfg.xml), and change the database properties. At this time i use mssql, so i don't have oracle example, but i find this for you:
<session-factory>
<property name="connection.username">xxxxx</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.password">xxxxx</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
</session-factory>
You must edit the values in this example. After this, all the hql queries runs in the oracle database.
|