[OS-JIRA] Created: (CAY-329) Long vs. Integer PK

From: jira-norepl..bjectstyle.org
Date: Mon Jun 20 2005 - 22:20:02 EDT

  • Next message: Andrus Adamchik: "Re: Cayenne CRUD tester and found bugs (1.2M4)"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-329

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-329
        Summary: Long vs. Integer PK
           Type: Bug

         Status: Assigned
       Priority: Major

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Fix Fors:
                 1.2 [DEV]
       Versions:
                 1.1
                 1.2 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Andrus Adamchik

        Created: Mon, 20 Jun 2005 10:19 PM
        Updated: Mon, 20 Jun 2005 10:19 PM

    Description:
    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

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Mon Jun 20 2005 - 22:20:03 EDT