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/14 16:54:58 UTC

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

Alexei Grigoriev created CAY-2140:
-------------------------------------

             Summary: 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)