Hi,

This query gives results.  

SELECT OBJECT(o) FROM GEN_ORDER o WHERE 
  |     (
  |             (
  |                     (o.serviceCode = ?1) 
  |                             AND 
  |                     (o.transitTime.fromZone = ?2) 
  |                             AND 
  |                     (o.transitTime.toZone = ?3)
  |             )
  |     ) OFFSET ?4 LIMIT ?5

serviceCode, transitTime, fromZone etc are all local EJBs.

Following one ORs the above with another condition set in brackets.   But this 
does not give any results, though it should give at least the above sql 
returned records.

SELECT OBJECT(o) FROM GEN_ORDER o 
  |     WHERE 
  |     (
  |             (
  |                     (o.serviceCode = ?1) 
  |                             AND 
  |                     (o.transitTime.fromZone = ?2) 
  |                             AND 
  |                     (o.transitTime.toZone = ?3)
  |             ) 
  |     OR 
  |             (
  |                     (o.serviceCode = ?4) 
  |                             AND 
  |                     (o.dataReturnTime.fromZone = ?5) 
  |                             AND 
  |                     (o.dataReturnTime.toZone = ?6)
  |             )
  |     ) OFFSET ?7 LIMIT ?8

Here in the second condition set dataReturnTime, fromZone etc are also local 
EJBs.

Query params etc. are all correct and the query executes but no results.
Why when ORing ANDed conditions give no results?

Please help.




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890517#3890517

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890517


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to