Hi,
Is there a way to do a outer join between 2 objects using the mappings posted below?
An Investigation might not have an alarm, in oracle I would use the '(+)' operator, what I would like to do in HQL is something like this:
select i, a
from Investigation i,
Alarm a
where i.id = ?
and i.alarmId = a.id (+)
given the mappings below how can I create a HQL query to accomplish this?
Thanks,
Amir
Hibernate version: 3.0
Mapping documents:
<hibernate-mapping>
<class name="Investigation" table="investigation" lazy="false">
<id name="id" column="id" access="field">
<generator class="sequence">
<param name="sequence">investigation_serial</param>
</generator>
</id>
<property name="alarmId" column="alarm_id" access="field"/>
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="Alarm" table="alarm" lazy="false">
<id name="id" column="id" access="field">
<generator class="sequence">
<param name="sequence">alarm_serial</param>
</generator>
</id>
<property name="name" column="name" />
</class>
</hibernate-mapping>
Name and version of the database you are using: Oracle 9i
|