not working Example:
Code:
select PARC.cle.codeParc, TRADFIC.texte from biz.carsystems.noyau.db.DbParc PARC
right outer join biz.carsystems.noyau.db.DbTradfic TRAFIC
on TRADFIC.cle.nomFichier = "PARC" and TRADFIC.cle.codeZone = PARC.cle.codeMarque
Here you have 2 tables with no association in the mapping files. On which we want to apply a outer join.
mapping of table PARC
Code:
<class dynamic-update="true" name="biz.carsystems.noyau.db.DbParc" table="`PARC`" optimistic-lock="none">
<cache usage="read-write" />
<composite-id name="cle" class="biz.carsystems.noyau.db.DbParcPK">
<key-property name="codeParc" column="`codeParc`" type="biz.carsystems.noyau.lang.CsTexte" />
</composite-id>
<property name="libelleLong" type="biz.carsystems.noyau.lang.CsTexte" not-null="false">
<column name="`libelleLong`" sql-type="varchar" />
</property>
<property name="immat" type="biz.carsystems.noyau.lang.CsTexte" not-null="false">
<column name="`immat`" sql-type="varchar" />
</property>
<property name="dateImmat" type="biz.carsystems.noyau.lang.CsDate" not-null="false">
<column name="`dateImmat`" sql-type="date" />
</property>
<property name="codeMarque" type="biz.carsystems.noyau.lang.CsTexte" not-null="false">
<column name="`codeMarque`" sql-type="varchar" />
</property>
<property name="codeModele" type="biz.carsystems.noyau.lang.CsTexte" not-null="false">
<column name="`codeModele`" sql-type="varchar" />
</property>
<property name="catTarif" type="biz.carsystems.noyau.lang.CsTexte" not-null="false">
<column name="`catTarif`" sql-type="varchar" />
</property>
</class>
mapping of Trafic
Code:
<class dynamic-update="true" name="biz.carsystems.noyau.db.DbTradfic" table="`TRADFIC`" optimistic-lock="none">
<cache usage="read-write" />
<composite-id name="cle" class="biz.carsystems.noyau.db.DbTradficPK">
<key-property name="nomFichier" column="`nomFichier`" type="biz.carsystems.noyau.lang.CsTexte" />
<key-property name="cleEnreg" column="`cleEnreg`" type="biz.carsystems.noyau.lang.CsTexte" />
<key-property name="codeZone" column="`codeZone`" type="biz.carsystems.noyau.lang.CsTexte" />
<key-property name="langue" column="`langue`" type="biz.carsystems.noyau.lang.CsTexte" />
</composite-id>
<property name="texte" type="biz.carsystems.noyau.lang.CsTexte" not-null="false">
<column name="`texte`" sql-type="varchar" />
</property>
</class>