<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>.ExternalClass .EC_hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
.ExternalClass BODY.EC_hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>
<TABLE class=EC_forumline cellSpacing=2 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD style="PADDING-LEFT: 5px; PADDING-BOTTOM: 5px" vAlign=top width="100%" bgColor=#ffffff height=28>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD colSpan=2><SPAN class=EC_postbody>I have a class mapped as follows... <BR><BR><class name="equipment" table="MSF600"> <BR><BR><id name="equipNo" column="EQUIP_NO"/> <BR><BR><map name="nameplate" table="MSF6A4" outer-join="true" fetch="join"> <BR><key column="EQUIP_NO"/> <BR><map-key column="ATTRIB_NAME" type="string"/> <BR><element column="ATTRIB_VALUE" type="string"/> <BR></map> <BR><BR></class> <BR><BR>The map collection allows me to perform queries on the equipment as follows... <BR><BR>from equipment where nameplate["TARIFF"] not in ('RU', 'BG') <BR><BR>This works fine up until I want to do a query like this... <BR><BR>from equipment where nameplate["TARIFF"] is null or nameplate["TARIFF"] not in ('RU', 'BG') <BR><BR>The problem happens because hibernate performs an implicit inner join with the MSF6A4 table when it detects a nameplate[""] in the where clause. If the "TARIFF" nameplate doesn't exist, the join will not match and so no results will be returned. <BR><BR>I know I can use... <BR><BR>from equipment where "TARIFF" not in indices(nameplate) <BR><BR>but still doesn't work in a combined where clause like this.. <BR><BR>from equipment where "TARIFF" not in indices(nameplate) or nameplate["TARIFF"] not in ('RU', 'BG') <BR><BR>because as soon as the nameplate["TARIFF"] appears, hibernate does the implicit inner join to MSF6A4 again and finds no results. <BR><BR>I think my problem would be solved if I could force hibernate to perform an outer-join on the MSF6AF table. <BR><BR>Is this possible? Is there some other way to get this to work?</SPAN><SPAN class=EC_gensmall></SPAN></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=2>
<HR>
</TD></TR></TBODY></TABLE><BR>
<HR>
<A href="http:///" target=_blank></A><br /><hr /> <a href='' target='_new'></a></body>
</html>