Hi,
I just wonder how to add a join condition within a join mapping.
Code:
<hibernate-mapping>
<class name="VoUser" schema="org"
table="org_vdbusers" polymorphism="explicit">
<id name="orgaId" column="orga_id">
<generator class="assigned" />
</id>
<property name="login" column="user_login" />
<property name="password" column="user_password" />
<join schema="org" table="v_org_contactpersons" optional="true"
inverse="true"
cond="relationshipType=3"Code:
>
<key column="orga_id" on-delete="noaction" />
<property name="orgrId" column="orgr_id" insert="false" />
<property name="relationshipType"
insert="false" update="false">
</property>
<property name="longName" column="orga_longname" />
<property name="lastName" column="pers_lastname" />
<property name="firstName" column="pers_firstname" />
</join>
</class>
</hibernate-mapping>
which should lead to something like select bla,bla,bla from org_users u join v_org_contactpersons p on (u.orga_id = p.orga_id AND relt_id = 3)
Thanks