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] [Closed] (CAY-2566) Flush action generates update for PK attribute in case of toDepPK relationship
Date Wed, 17 Apr 2019 07:27:00 GMT

     [ 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)

Mime
View raw message