You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fox (JIRA)" <ji...@apache.org> on 2012/11/18 22:40:58 UTC

[jira] [Created] (TORQUE-247) Select using a SimpleKey containing a null value does not work

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:
java.lang.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


[jira] [Resolved] (TORQUE-247) Select using a SimpleKey containing a null value does not work

Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox resolved TORQUE-247.
-------------------------------

    Resolution: Fixed
    
> 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:
> java.lang.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