Hi All,
I have been trying to acheive the below SQL in Hibernate 3 but could not since a while, I would appreciate any help.
SELECT
cs.id,
cs.num,
cs.line_id,
acc.system_cd,
FROM
table a,
tableb b,
tablecscs cs,
tableacc acc
WHERE
a.num = b.num AND
a.num = cs.num AND
b.code = '5485'
acc.cd = 'S'
First Question I have is: how do I associate all the tables in the where clause in the xml file which habe a foriegn-key relationship and also how do I include the values from clumns in 2 different tables to be in one class.
I have come up with the following simple xml file: but I could not put the foriegn key relationships and I dont know where to start tryied all kinds of things .
Please let me know.
Thanks
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.telcove.phoenix.picc.dao.common.CurrSvcItem" table="tablecs"
dynamic-insert="false"
dynamic-update="false">
<id name="No" type="long" column="NUM" >
<generator class="increment"/>
</id>
<property name="Id">
<column name="ID"/>
</property>
<property name="No">
<column name="num"/>
</property>
</class>
</hibernate-mapping>
|