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

Flush action generates update for PK attribute in case of toDepPK relationship

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1.B1
    • 4.1.B2
    • Core Library
    • None

    Description

      This bug was introduced by fix for CAY-2282.

      Example:

      GeneratedColumnDep dependent = context.newObject(GeneratedColumnDep.class);
      dependent.setName("aaa");
      dependent.setToMaster(idObject);
      context.commitChanges();
      

      Generated SQL:

      INSERT INTO GENERATED_COLUMN_DEP (GENERATED_COLUMN_FK, NAME) VALUES (?, ?)
      UPDATE GENERATED_COLUMN_TEST SET GENERATED_COLUMN = ? WHERE GENERATED_COLUMN = ?
      

      Note completely meaningless UPDATE query.

      Attachments

        Activity

          People

            ntimofeev Nikita Timofeev
            ntimofeev Nikita Timofeev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: