I have a class with the property
Quote:
class
name="BatchDuplicateCheckInformation"
table="T_CHECK"
schema="NSS">
<id
name="OId"
type="long">
<column
name="OID"
scale="0" />
</id>
<set
name="names"
lazy="false">
<key
column="SUBJECT_ID"/>
<one-to-many
class="SubjectName"/>
</set>
and the object has a Collection<SubjectName> names with relevant getter/setter. this work well and retuens a set of all the subject associated with the check but I want to change this to a single object of type SubjectName name='primaryName' by essentially adding a where cause of NAME_TYPE_CODE='PRIM' and changing to many-to-one or one-to-one or property and the relevant changes to the object.
But different attempts at this have failed as the <formula> seems to work on a <properties> or composite key.
The primary ket on the T_SUBJECT_NAME is OID and the foreign key is SUBJECT_ID, there is a column of NAME_TYPE_CODE
Any sugestions most welcome.