Hello All,
As we use Disjuntion to 'OR' different Criterion is it possible to 'OR' different Criteria?
Scenario:
We have 3 party types - sasinesThirdParties, sasinesGrantors and sasinesGrantees.
Now we need to have a search query where the Forename and the Surname is entered by the user, it could be the forename and surname of any of the three party types. Hence there is a need to OR these criteria (3 party types). Is there a way by which we could attain this?
Please find below the hbm snippet for the same:
Code:
<idbag name="sasinesThirdParties" table="SASINES_REG_ENTRY_THIRD_PARTY" cascade="save-update,persist" >
<collection-id type="long" column="ID">
<generator class="sequence">
<param name="sequence">SREP_ID_SEQ</param>
</generator>
</collection-id>
<key column="SRE_ID" />
<many-to-many column="LEGR_ID"
class="ros.core.businessfunctions.landproperty.sasines.legalrecord.legalentity.SasinesThirdParty"/>
</idbag>
<idbag name="sasinesGrantors" table="SASINES_REG_ENTRY_GRANTOR" cascade="save-update,persist" >
<collection-id type="long" column="ID">
<generator class="sequence">
<param name="sequence">SRGR_ID_SEQ</param>
</generator>
</collection-id>
<key column="SRE_ID" />
<many-to-many column="LEGR_ID"
class="ros.core.businessfunctions.landproperty.sasines.legalrecord.legalentity.SasinesGrantor"/>
</idbag>
<idbag name="sasinesGrantees" table="SASINES_REG_ENTRY_GRANTEE" cascade="save-update,persist" >
<collection-id type="long" column="ID">
<generator class="sequence">
<param name="sequence">SRGE_ID_SEQ</param>
</generator>
</collection-id>
<key column="SRE_ID" />
<many-to-many column="LEGR_ID"
class="ros.core.businessfunctions.landproperty.sasines.legalrecord.legalentity.SasinesGrantee"/>
</idbag>
Thanks!!!