[JIRA] Created: (CAY-509) Normalization of numeric ObjectId values

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Sat Apr 15 2006 - 14:29:19 EDT

  • Next message: Jean T. Anderson: "Re: Summer of Code"

    Normalization of numeric ObjectId values
    -----------------------------------------

             Key: CAY-509
             URL: http://issues.apache.org/cayenne/browse/CAY-509
         Project: Cayenne
            Type: Task

      Components: Cayenne Core Library
        Versions: AFTER 1.2
        Reporter: Andrus Adamchik
         Fix For: AFTER 1.2

    ObjectId is normally made up of the values obtained from the database columns that have no Java mapping. This creates a need to "normalize" stored numeric values so that "equals" and "hashCode" methods of any two ObjectIds pointing to the same logical object, but obtained via different means, behave correctly.

    In 1.2 this problem is solved by converting all numeric values to primitive "long" before doing comparison (CAY-503), still such solution is a hack. Instead we should enforce a standard Java Type (per JDBC spec, as returned by TypesMapping.getJavaBySqlType(int)) in a number of places where the values can get inside the ObjectId:

    http://objectstyle.org/cayenne/lists/cayenne-devel/2006/04/0115.html

    * ObjectIdQuery (and its interceptors along the stack)
    * pk generator (that always returns Integer that may need to be converted to BigDecimal)
    * DataDomainFlushObserver (autoincrement keys are picked up here)
    * ???

    Another related issue: CAY-399

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators:
       http://issues.apache.org/cayenne/secure/Administrators.jspa
    -
    For more information on JIRA, see:
       http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Sat Apr 15 2006 - 14:30:15 EDT