You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2019/04/16 14:57:00 UTC

[jira] [Created] (CAY-2566) Flush action generates update for PK attribute in case of toDepPK relationship

Nikita Timofeev created CAY-2566:
------------------------------------

             Summary: Flush action generates update for PK attribute in case of toDepPK relationship
                 Key: CAY-2566
                 URL: https://issues.apache.org/jira/browse/CAY-2566
             Project: Cayenne
          Issue Type: Bug
          Components: Core Library
    Affects Versions: 4.1.B1
            Reporter: Nikita Timofeev
            Assignee: Nikita Timofeev
             Fix For: 4.1.B2


This bug was introduced by fix for CAY-2282.

Example:
{code}
GeneratedColumnDep dependent = context.newObject(GeneratedColumnDep.class);
dependent.setName("aaa");
dependent.setToMaster(idObject);
context.commitChanges();
{code}
Generated SQL:
{code}
INSERT INTO GENERATED_COLUMN_DEP (GENERATED_COLUMN_FK, NAME) VALUES (?, ?)
UPDATE GENERATED_COLUMN_TEST SET GENERATED_COLUMN = ? WHERE GENERATED_COLUMN = ?
{code}

Note completely meaningless UPDATE query.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)