Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-323

Cayenne thinks array types are modified across request/response cycles

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1 [LEGACY]
    • 1.1 [LEGACY]
    • Core Library
    • None
    • All OS + Servlets

    Description

      When Cayenne is used in a web-based application, such as Tapestry, and DataObjects are serialized in the session between request/response loops, any array data types are reconstituted to new memory locations when deserialzed. Because the equals() method in Java compares pointers for arrays instead of comparing the contents of the array, Cayenne believes the array attribute has been modified even if the contents haven't changed (equivalent array values are considered modified). This will cause Cayenne to potentially issue unneeded UPDATE statements or to include array attributes which haven't changed (even though other attributes changed in that row).

      This problem is particularly noticeable when your primary keys are byte arrays.

      Attachments

        Activity

          People

            blacknext Michael Gentry
            blacknext Michael Gentry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: