[
https://issues.apache.org/jira/browse/OPENJPA-2994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119687#comment-18119687
]
ASF subversion and git services commented on OPENJPA-2994:
----------------------------------------------------------
Commit 57e7ee3efd9834f3342181e4084f8f1b983b17ae in openjpa's branch
refs/heads/OPENJPA-2994 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=57e7ee3ef ]
[OPENJPA-2994] Add compatibility option for the default map key column name
Section 11.1.35 requires the default map key column to be named
<field>_KEY, which does not match schemas created by earlier releases
(where the default was "key", usually materialized as "KEY0").
Gate the default name derivation behind the new compatibility option
UseSpecDefaultMapKeyColumnName. It defaults to true, so the spec name
is used out of the box; setting it to false restores the old default.
An explicit @MapKeyColumn is unaffected either way.
> Map-key column default KEY0 to entityCs_KEY breaks upgrades
> -----------------------------------------------------------
>
> Key: OPENJPA-2994
> URL: https://issues.apache.org/jira/browse/OPENJPA-2994
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion thread:
> https://github.com/apache/openjpa/pull/144#discussion_r3683007155
> **(medium)** Changing the expected default map-key column from KEY/KEY0 to
> entityCs_KEY (also TestContainerSpecCompatibilityOptions.java:426 and the
> KEY0 -> photos_KEY expected SQL in TestTypesafeCriteria) is spec-correct, but
> silently changes DDL/SQL against existing schemas created by older OpenJPA
> versions - upgrades will not find the KEY0 column. Should this be gated
> behind a compatibility option (this test class exists exactly for that) and
> called out in migration notes?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)