Predicate exists building two seperate querys instead of AND with in a single query.

16 views
Skip to first unread message

Chandu Reddy

unread,
Mar 23, 2017, 12:15:48 PM3/23/17
to Querydsl
Hi,

i am having a request with search like below.

If we observe the query, predicate is building multiple exists, but my requirement is to build with single exists with AND conditions,
could any one help me in this.

its an search we are not building manually, we are passing the request to predicate.


http://.............search?details.name=CUSTOMER_NAME&details.text=CHANDRA



 where
  (
       exists (
        select
             1
       from
            TABLE_NAME details1_
        where
              workreques0_.WRK_RQST_ID=details1_.WRK_RQST_ID
               and details1_.PARM_TYP_CDE=?
        )
  )
and (
 exists (
      select
            1
      from
        TABLE_NAME details2_
      where
               workreques0_.WRK_RQST_ID=details2_.WRK_RQST_ID
              and details2_.WRK_RQST_DTL_VAL_TXT=?
            )
)


Thanks
Chandra.
Reply all
Reply to author
Forward
0 new messages