Joined: Tue Jul 20, 2004 12:27 am Posts: 8
|
Hi,
Is it possible to use join relationships using single table in hibernate......
My query looks like this.....
"select i from com.vstl.hybernate.action.Item as i left outer join fetch com.vstl.hybernate.action.Item as j"
will this work with slight modifications in the Item.hbm.xml file....which looks like this.....Plz help me out.
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.vstl.hybernate.action.Item" table="item" >
<id name="id" column="id" type="java.lang.Long" >
<generator class="identity" />
</id>
<many-to-one name="noname" column="name" property-ref="name" class="com.vstl.hybernate.action.Item" update="false" insert="false" outer-join="true" />
<property name="name" column="name" type="java.lang.String" />
<property name="description" column="description" type="java.lang.String" />
</class>
</hibernate-mapping>
Thanks in advance...
_________________ Aru
|
|