Allrighty then... is anybody alive out there? I've spent a lot of time on this and am getting nowhere. I even bought the book which has nothing on this. Maybe there's a little piece of documentatin I'm overlooking... either way, all that matters is I'm stuck.
So let's try this another way...
Anybody know why the <loader/> element would be completely ignored in the simplified example below? I can mangle the query-ref property to point to a query that doesn't exist... no error. I can take the entire element out, my query results are the same no matter what. I even tried upgrading to 3.1rc2.
I'm just doing a straight HQL query to test the results... maybe I'm supposed to do something special in HQL??
Code:
select ut.units from UnitType ut
.. gives me ALL units, not "where unit.type_id = 5"
Code:
<class name="UnitType">
....
<set name="units" invers="true">
<key/>
<one-to-many class="Unit"/>
<loader query-ref="units.collection.query"/>
</set>
</class>
<sql-query name="units.collection.query">
<load-collection alias="unit" role="UnitType.units"/>
select {unit.*} from unit where unit.type_id = 5
</sql-query>