-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: OR-ing (Disjunction) Criteria instead of Criterion
PostPosted: Wed Jul 07, 2010 5:20 am 
Newbie

Joined: Wed Jul 07, 2010 5:09 am
Posts: 2
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!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.