[
https://issues.apache.org/jira/browse/OPENJPA-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134626#comment-18134626
]
ASF subversion and git services commented on OPENJPA-3033:
----------------------------------------------------------
Commit bd070b2c1576680eed6a8f8e3cfc3affc4526041 in openjpa's branch
refs/heads/OPENJPA-3044 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=bd070b2c1 ]
[OPENJPA-3033] Store char fields as CHAR(1) on Derby, H2 and SQL Server (#245)
* [OPENJPA-3033] Store char fields as CHAR(1) on Derby and SQL Server
DerbyDictionary and SQLServerDictionary used the DBDictionary default
StoreCharsAsNumbers=true, so a char was written as its code point. On a
CHAR(1) column such as the one in the Jakarta Persistence TCK schema, Derby
failed the insert with 22001 ('97' does not fit) and SQL Server failed to
read '*' as an INTEGER. Both now default to native CHAR storage, like DB2,
MySQL and PostgreSQL 9+; an explicit StoreCharsAsNumbers=true still selects
numeric columns.
A generated CHAR column for a char/Character field without an explicit
length is now CHAR(1) instead of CHAR(CharacterColumnSize), which Derby
rejected as CHAR(255).
* [OPENJPA-3033] Store char fields as CHAR(1) on H2 too
> Derby: basic type, generator and numeric result type tests fail
> ---------------------------------------------------------------
>
> Key: OPENJPA-3033
> URL: https://issues.apache.org/jira/browse/OPENJPA-3033
> Project: OpenJPA
> Issue Type: Sub-task
> Reporter: Richard Zowalla
> Assignee: Richard Zowalla
> Priority: Major
> Fix For: 4.2.0
>
>
> These tests fail on Derby and only report "failed", the cause has to be found
> from the TCK logs:
> * {{fieldTypeTest1}} to {{fieldTypeTest17}}, {{propertyTypeTest1}} to
> {{propertyTypeTest13}} (field and property access)
> * {{autoTypeTest1}} to {{autoTypeTest6}}, {{generatorTypeTest1}} to
> {{generatorTypeTest6}}, {{generatorTypeSequenceTest}}
> * {{persistBasicTest2}} to {{persistBasicTest5}}
> * {{Client2}} / {{Client5}}: {{BigDecimal}}, {{BigInteger}}, {{Double}},
> {{Float}}, {{Long}} and {{ShortOperandResultTypeTests}}
> * {{dateTimeTest}} (Java 8 date and time types)
> {{propertyTypeTest1}} and {{autoTypeTest1}} also fail on SQL Server.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)