I have a feeling I'm doing something very wrong, this simple query fails to parse:
Code:
select
b2
from
Benefit b1,
Benefit b2
where
b1.benefitType.code = 'H001' and
b2 = b1
The error message is "path expression ends in a composite value: benefit1_". My mapping for Benefit is:
Code:
<class name="com.ff.model.life400.core.Benefit" table="LIFE400_VW_BENEFIT">
<composite-id>
<key-property name="policyNumber" column="CHDRNUM"/>
<key-property name="lifeKey" column="LIFE"/>
<key-property name="coverage" column="COVERAGE"/>
<key-property name="rider" column="RIDER"/>
<key-property name="jointLifeKey" column="JLIFE"/>
</composite-id>
<property name="sumInsured" column="SUMINS"/>
<many-to-one name="riskStatus" column="STATCODE"/>
<many-to-one name="benefitType" column="CRTABLE"/>
</class>
I tried using a component composite ID and got the same problem. Am I going mad or is this simply not supported?
Thanks
Niall