You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Alexei Grigoriev (JIRA)" <ji...@apache.org> on 2016/11/15 08:07:58 UTC

[jira] [Closed] (CAY-2140) An option to explicitly turn off PK generation

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

Alexei Grigoriev closed CAY-2140.
---------------------------------
    Resolution: Not A Problem

Have a second thought. We should use better visualisation of relationships to resolve this problem.

> An option to explicitly turn off PK generation
> ----------------------------------------------
>
>                 Key: CAY-2140
>                 URL: https://issues.apache.org/jira/browse/CAY-2140
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Modeler
>            Reporter: Alexei Grigoriev
>            Assignee: Alexei Grigoriev
>            Priority: Minor
>
> There are cases when PK generation should be turned off explicitly. 
> For example when implementing many-to-many relation manually I want an intermediate entity with keys propagated from other entities.
> Cayenne does it implicitly. In such case Cayenne propagates keys from related entities and silently ignores pk_generation setting. This approach looks confusing. And it is not easy to find out what is wrong with model when Cayenne reports errors.
> I propose to introduce a new pk_generation_strategy for 'no generation' and a validation requiring no generation if to_dep_pk on related entity is set.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)