[ 
https://issues.apache.org/jira/browse/OPENJPA-3064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137739#comment-18137739
 ] 

ASF subversion and git services commented on OPENJPA-3064:
----------------------------------------------------------

Commit 717f25c4009fa9abe8495b343dd7bc6b3d2c498b in openjpa's branch 
refs/heads/OPENJPA-3064 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=717f25c40 ]

[OPENJPA-3064] Drop the indexes and constraints of a column before the column 
on SQL Server

When a table holds columns that the mapping does not know, for example
of a subclass that another test mapped to the same table, the schema
tool drops the mapped columns one by one instead of the table. SQL
Server refuses to drop a column that the primary key, a unique
constraint, an index, a default constraint or a foreign key of the
table depends on, while other databases drop these with the column.
Drop them first, as found in the catalog views, and then the column in
one transaction, so that nothing is dropped when the column cannot be
dropped.


> SQL Server: decimal scale, EXTRACT(SECOND/WEEK), current local time and 
> shared test tables fail
> -----------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-3064
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3064
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>            Reporter: Richard Zowalla
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> The test suite on Microsoft SQL Server ({{-Dtest-mssql-docker}}) has 13 
> failures and 13 errors (4022 tests):
> * {{TestDecimalScale}}, {{TestUnarySign}}, {{TestArithmeticResultType}}: 
> decimal values are stored rounded to integers ({{2.5 <> 3}}, {{-25.5 <> 
> -26}}). Same cause as OPENJPA-3051 (H2), OPENJPA-3062 (MySQL, MariaDB) and 
> OPENJPA-3063 (HSQLDB): a decimal column without a precision has scale 0 
> ({{DECIMAL}} is {{DECIMAL(18, 0)}} on SQL Server).
> * {{TestEJBQLFunction.testExtractSecondKeepsFractionFromTime/Timestamp}}: 
> {{EXTRACT(SECOND)}} drops the fraction ({{expected:<42.75> but was:<42.0>}}), 
> see OPENJPA-3055.
> * {{TestExtractDateTimeField.testExtractWeek}}: {{expected:<[1, 52]> but 
> was:<[1, 53]>}}, {{EXTRACT(WEEK)}} is not the ISO week, see OPENJPA-3037.
> * {{TestJava8TimeTypes.testGetCurrentLocalTime}} fails.
> * {{TestFlushModeAutoNavigation}}, {{TestTckFixes}}, 
> {{TestTreatJoinOnEmbeddable}}: setting up the schema fails with "The object 
> 'PK__TPRODUCT__...' is dependent on column 'id'" ({{ALTER TABLE TPRODUCT DROP 
> COLUMN id}}, {{ALTER TABLE FLUSH_ORDER DROP COLUMN ID}}, code 5074). Several 
> test entities map the same table names ({{TPRODUCT}}, {{FLUSH_ORDER}}) with 
> different columns, and the schema refresh tries to drop a primary key column.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to