Hello,
The javadocs say that getObject(String, Object[], Class) will return NULL if the result of the query is NULL.
I am testing for a NULL in my unit tests, and instead of getting NULL from getObject, I get an exception:
I think this isn't correct, given the javadocs. I am using a CVS build right before 1.1 release (a few days before 1.1)Code:org.springframework.dao.IncorrectResultSizeDataAccessException: Expected single row but found none at org.springframework.jdbc.core.JdbcTemplate$ObjectResultSetExtractor.extractData(JdbcTemplate.java:982) at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:390) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:334) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:375) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:411) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:470) at com.hic.eboss.dao.BrimsDAOJdbcImpl.getBusinessName(BrimsDAOJdbcImpl.java:99) at
Am I misinterpreting the javadocs?
Thanks!
Seth


Reply With Quote