Hi,
this might be a stupid question...
I have a mapping ...
Code:
<hibernate-mapping>
<class name="ims.domain.model.Common.Patient" table="SID" >
<id name="id" column="pkey" type="long">
<generator class="increment" >
</generator>
</id>
<component name="currentName" class="ims.domain.model.Common.Name" >
<property name="surname" column="snm" />
<property name="forename" column="fnm1" />
<many-to-one name="title" class="ims.domain.model.Lookup" column="titl"/>
</component>
<property name="dob" column="dob" />
<property name="dod" column="dod"/>
<many-to-one name="sex" class="ims.domain.model.Lookup" column="sex"/>
<one-to-one name="currentAddress" class = "ims.domain.model.Common.Address" />
</class>
</hibernate-mapping>
and I want to use the Criteria class to retrieve Patients based on a "surname" search. My question is, what should I put into the Expression in order to search on the "surname" property which is in the "currentName" component?
TIA
John