Hi,
It seems Hibernate always uses left outer join to get the data from secondary table. Is there a way to let it use inner join?
Annotation:
@SecondaryTable(name = "SUB_CLASS_ONE",
pkJoinColumns = @PrimaryKeyJoinColumn(name = "SUB_CLASS_ONE_ID"))
Generated Query:
select
mainclass0_.MAIN_CLASS_ID as MAIN1_0_,
mainclass0_1_.SUB_CLASS_ONE_ID as SUB1_3_,
from
subclass_test.main_class mainclass0_
left outer join
subclass_test.Sub_Class_One mainclass0_1_
on mainclass0_.MAIN_CLASS_ID=mainclass0_1_.SUB_CLASS_ONE_ID
where
mainclass0_.MAIN_CLASS_ID=?
-thanks
|