cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Grigoriev (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-2140) An option to explicitly turn off PK generation
Date Mon, 14 Nov 2016 16:54:58 GMT
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)

Mime
View raw message