[ 
https://issues.apache.org/cayenne/browse/CAY-329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrus Adamchik closed CAY-329.
-------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: UNDEFINED FUTURE)
                   3.0

> Long vs. Integer PK
> -------------------
>
>                 Key: CAY-329
>                 URL: https://issues.apache.org/cayenne/browse/CAY-329
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 1.1 [LEGACY], 1.2 [STABLE]
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.0
>
>         Attachments: cay-329-tests-patch.txt
>
>
> Test suite submitted by Mikaƫl Cluseau:
> http://www.objectstyle.org/cayenne/lists/cayenne-devel/2005/06/0036.html
> fails when an object is created, committed and then updated and committed. 
> SQL UPDATE updates an ID value for no good reason. My investigation shows 
> that this is due to Integer vs. Long PK... BIGINT PK columns default mapping 
> is Long per JDBC standard. So on fetch it is converted to Long. PK generator 
> on the other hand has a hardcoded behavior to create Integer ... So two 
> values behave as if they are non-equal and generate a bogus update. We need 
> to fix PK generator to use default JDBC to java mapping instead of assuming 
> Integer.
> Similar situation has been discussed before:
> http://www.objectstyle.org/cayenne/lists/cayenne-devel/2005/03/0086.html

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

Reply via email to