1 Reply Latest reply on Jul 18, 2003 12:02 PM by Kevin Hooke

    jboss3.0.3 cmp finders ignoring 'IS NOT NULL' in jboss-ql?

    Kevin Hooke Newbie

      Hi - I have a finder on a CMP Entity bean that has 'IS NOT NULL' in the WHERE clause. The SQL that JBoss is generating for this finder (output in the server.log) does not contain the IS NOT NULL clause.

      Here is the finder in my jaws.xml:

      find by status flag

      findByStatus
      boolean

      <jboss-ql><![CDATA[select object(w) from details w where w.name IS NOT NULL AND w.active_ind = ?1]]></jboss-ql>


      The SQL generated for this finder, from the server.log is:
      2003-07-17 18:33:40,447 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] findByStatus command executing: SELECT id FROM details WHERE status=?

      (and then so on for each row retrieved that matches the query).

      Why is the IS NOT NULL being ignored? Is there some setting that I need to specify to allow processing of null values in columns?

      I could understand if the SQL (of JBoss-QL) syntax was incorrect, but as far as I know this syntax is right?

      Any ideas?

      Thanks in advance,
      Kevin