You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2007/10/16 17:52:50 UTC

[jira] Commented: (DBUTILS-42) Object with Long or Decimal got initial zero value while database field is null

    [ https://issues.apache.org/jira/browse/DBUTILS-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535275 ] 

Henri Yandell commented on DBUTILS-42:
--------------------------------------

What part of the DbUtils API are you using?

> Object with Long or Decimal got initial zero value while database field is null
> -------------------------------------------------------------------------------
>
>                 Key: DBUTILS-42
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-42
>             Project: Commons DbUtils
>          Issue Type: Improvement
>    Affects Versions: 1.1
>         Environment: JDK 5.0, MSSQL 2000
>            Reporter: Matt Jiang
>
> While I use dbutil1.1, I got a big different implementation betweeb 1.0 and 1.1.
> Given a Java object, it has a property with Long data type; mapping to database, its table field datatype is bigint.
> If it has a record and its value is null.
> In 1.0 implementation, if I load entity, then we can see the property in Java object is also null.
> But in 1.1 implementation, the Java object will got a Long object with 0 inside.
> This behavior change does big impact if I upgrade from 1.0 to 1.1. It might make application logic fail because origional null status now become a Long(0) value to map to null value in database.
> I suggest to change it back. If null value in database, then mapped Java object should be null as well, not new a Long(0) to be a initial value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.