Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2263

Update statements should not update the primary key of database unless the primary key has in fact changed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 2.2.0
    • 2.2.0
    • jdbc
    • None

    Description

      I have encountered a situation while creating an openjpa dictionary for teradata. It seems teradata does not like it when the primary key is updated.

      i.e: update tablex set pk=1 where pk=1;

      Following the code it seems RowImpl.java contains a method getUpdateSQL which uses the dictionary to various things but it doesn't allow the dictionary to change the statement itself.

      The specific functionality I need here is to only update the pk if the pk has changed or maybe an option not to update the pk at all.

      Attachments

        1. testselect0.zip
          8.30 MB
          garpinc

        Activity

          People

            Unassigned Unassigned
            garpinc garpinc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: