[
https://issues.apache.org/jira/browse/OPENJPA-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109491#comment-18109491
]
ASF subversion and git services commented on OPENJPA-2971:
----------------------------------------------------------
Commit 3f10fc4948a2aa2f6c242a35c0412b0191e3eb8a in openjpa's branch
refs/heads/jpa32-migration-considerations from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=3f10fc494 ]
[OPENJPA-2971] Make PostgreSQL StoreCharsAsNumbers default overridable
Since #144 PostgresDictionary.connectedConfiguration() unconditionally set
storeCharsAsNumbers=false on PostgreSQL 9+, clobbering an explicit
StoreCharsAsNumbers=true from the DBDictionary plugin properties (which are
applied before connectedConfiguration()). Track explicit user values via a
new setStoreCharsAsNumbers() setter, make native CHAR storage the
PostgresDictionary default and only fall back to numeric storage on
PostgreSQL < 9 when not configured explicitly. Document the new default and
the opt-out in the reference guide and migration considerations; add
TestPostgresDictionary.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JJiFSo4QfgPaz7i5UQPREw
> storeCharsAsNumbers default flip breaks existing schemas
> --------------------------------------------------------
>
> Key: OPENJPA-2971
> URL: https://issues.apache.org/jira/browse/OPENJPA-2971
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Assignee: Richard Zowalla
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion thread:
> https://github.com/apache/openjpa/pull/144#discussion_r3683003316
> **(medium)** Flipping `storeCharsAsNumbers` to false for PostgreSQL >= 9
> changes the default mapping for existing applications: char fields previously
> stored in INTEGER columns will now map/validate as CHAR, so schemas created
> by older OpenJPA versions fail validation or read wrongly after an upgrade.
> Intended compatibility break? Should be release-noted and overridable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)