DB.asAny and DB.asString are not checking for null
When I perform a query with net.liftweb.db.DB.performQuery(sql) for my int and double columns I am getting zeros when the database has null. It seems to me that DB.asAny and DB.asString should check for null and leave that value as null instead of calling (for example) rs.getDouble(pos) and getting back 0.0
Problem code is at:
https://github.com/lift/framework/blob/master/persistence/db/src/main/scala/net/liftweb/db/DB.scala#L414
Problem code is at:
https://github.com/lift/framework/blob/master/persistence/db/src/main/scala/net/liftweb/db/DB.scala#L414
Leave a comment
(In revision:d0baf2e1f0d6963ffa4b6f36c081e2badfe698e9) Closes #1180. Return types for DB columns that are primitives will come back as null rather than 0/false if the columns are null
Branch: dpp_issue_1180
Branch: dpp_issue_1180