db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fox (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TORQUE-247) Select using a SimpleKey containing a null value does not work
Date Sun, 18 Nov 2012 21:40:58 GMT
Thomas Fox created TORQUE-247:

             Summary: Select using a SimpleKey containing a null value does not work
                 Key: TORQUE-247
                 URL: https://issues.apache.org/jira/browse/TORQUE-247
             Project: Torque
          Issue Type: Bug
          Components: Runtime
    Affects Versions: 4.0-beta1
            Reporter: Thomas Fox
            Assignee: Thomas Fox
             Fix For: 4.0-beta2

The code
        SimpleKey keyToSelect = SimpleKey.keyFor((Integer) null);
        Criteria criteria = new Criteria()
                .where(BookPeer.AUTHOR_ID, keyToSelect);

        List<Book> books = BookPeer.doSelect(criteria);
throws a NullPointerException:
        at org.apache.torque.util.BasePeerImpl.setPreparedStatementReplacements(BasePeerImpl.java:2246)
	at org.apache.torque.util.BasePeerImpl.doSelect(BasePeerImpl.java:1525)
	at org.apache.torque.util.BasePeerImpl.doSelect(BasePeerImpl.java:1152)
	at org.apache.torque.util.BasePeerImpl.doSelect(BasePeerImpl.java:961)
	at org.apache.torque.test.peer.base.BaseBookPeer.doSelect(BaseBookPeer.java:305)
The problem is that the NullValueBuilder does not check for ObjectKeys containing Null

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message