I'm using [b]Hibernate 2.1.4[/b] and here is a fragment of my mapping file:
[b]
<class name="beans.Model" table="Models">
<id name="id" column="kmodel" type="integer">
<generator class="sequence">
<param name="sequence">gen_kmodel</param>
</generator>
</id>
<property name="name" column="name" type="string" not-null="true" />
<set name="cheltuieli">
<key column="fkmodel"/>
<one-to-many class="beans.Cheltuiala"/>
</set>
</class>
<class name="beans.Cheltuiala" table="Cheltuieli">
<id name="id" column="kcheltuiala" type="integer">
<generator class="sequence">
<param name="sequence">gen_kcheltuiala</param>
</generator>
</id>
<property name="fkmodel" column="fkmodel" type="integer"/>
<property name="suma" column="suma" type="long"/>
[/b]
[b]I'm using firebird 1.5.0[/b]
If i use something like
select model.id, ch.suma
from beans.Model model
left outer join model.cheltuieli ch
where ch.suma > 10
everything works as it should. It generates:
select model0_.id, cheltuieli1_.suma
from Modele model0_
left outer join Cheltuieli cheltuieli1_ on
model0_.kmodel=cheltuieli1_.fkmodel
where cheltuieli1_.suma > 10
The [b]problem [/b] is that I want to obtain something like this:
select model0_.id, cheltuieli1_.suma
from Modele model0_
left outer join Cheltuieli cheltuieli1_ on
model0_.kmodel=cheltuieli1_.fkmodel
and cheltuieli1_.suma > 10
How can I do this? [/b]
|