Description
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