When using <any> for a single point polymorphic association, how can I efficiently retrieve the associated entities?
e.g.
Code:
<class name="Foo">
...
<property name="deptId"/>
<any name="bar" meta-type="string" id-type="Integer">
<meta-value value="bartype1" class="Bar1"/>
<meta-value value="bartype2" class="Bar2"/>
<column name="TYPE"/>
<column name="ID"/>
</any>
</class>
If I run the query "from Foo where deptId = 3" and 100 Foos are returned, is it possible to retrieve the Bars in the same query (outer-join) or in subsequent queries using batch fetching. "left join fetch bar" does not work, nor does setting batch-size in "bartypeX"
Thanks,
J.
(Hibernate version 2.1.7)[/code]