cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-2566) Flush action generates update for PK attribute in case of toDepPK relationship
Date Tue, 16 Apr 2019 14:57:00 GMT
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)

Mime
View raw message