Hi We have generated database mapping file with the help of myeclipse hibernate tools. It works fine.
Now we want to swich the database from DB1 to DB2 .
DB1 is our setup database name and DB2 is our Testing enviroment database.
We have hibernate.cfg.xml which specify the database it have configuration as
Quote:
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="connection.url">jdbc:mysql://localhost:3306/DB1?characterEncoding=UTF-8</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="myeclipse.connection.profile">MySql</property>
Now when we are trying to switch the database by changing the URL as
jdbc:mysql://localhost:3306/lsms?characterEncoding=UTF-8 ===>to===>jdbc:mysql://localhost:3306/DB2?characterEncoding=UTF-8
From frontend we are still acccessing the DB1 database
even if we change it to
jdbc:mysql://localhost:3306/?characterEncoding=UTF-8
means without secifing the database name still accessing the DB1 database.
Please suggest?
Thanks in advanced