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/17 07:27:00 UTC

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

     [ https://issues.apache.org/jira/browse/CAY-2566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikita Timofeev closed CAY-2566.
--------------------------------
    Resolution: Fixed

Fixed per https://github.com/apache/cayenne/commit/e8772c0aa5f1ef3c4aa74948108284c39354cca5

> 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
>            Priority: Major
>             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)