still not got it
my hibernate xml is
Code:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.username">db1</property>
<property name="connection.url">
jdbc:mysql://localhost:3306/db1
</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="connection.password">db1</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<mapping resource="hibernate/mappings/Table1.hbm.xml" />
<mapping resource="hibernate/mappings/Table2.hbm.xml" />
</session-factory>
</hibernate-configuration>
and my mapping for table1 is
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="hibernate.mappings.Table1" table="table1" >
<id name="col1" type="java.lang.Integer">
<column name="col1" />
<generator class="assigned" />
</id>
<property name="col2" type="java.lang.String">
<column name="col2" length="65535" />
</property>
</class>
</hibernate-mapping>
and for table2 which is not in db1
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="hibernate.mappings.Table2" table="table2" >
<id name="col1" type="java.lang.Integer">
<column name="col1" />
<generator class="assigned" />
</id>
<property name="col2" type="java.lang.String">
<column name="col2" length="65535" />
</property>
</class>
</hibernate-mapping>
now what to do ?