Bug 1299734 - [TEST] (6.4.x) Derived identity tests failing with DB2
Summary: [TEST] (6.4.x) Derived identity tests failing with DB2
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate
Version: 6.4.6
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: CR1
: EAP 6.4.8
Assignee: Gail Badner
QA Contact: Martin Simka
URL:
Whiteboard:
Depends On:
Blocks: eap648-payload 1315479
TreeView+ depends on / blocked
 
Reported: 2016-01-19 07:16 UTC by Jan Martiska
Modified: 2017-01-17 12:39 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-17 12:39:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Martiska 2016-01-19 07:16:06 UTC
This affects most tests in the package org/hibernate/test/annotations/derivedidentities when running with DB2

The tests need two adjustments:
- all primary key columns in derived entities need to be declared non-null, because db2 requires primary key components to explicitly be non-null
- if Employee.firstName and PolicyId.type are left to their default size (255) then db2 complains that it can't handle such long primary keys:

    07:55:18,511 ERROR SchemaExport:426 - HHH000389: Unsuccessful: create table Policy (type varchar(255) not null, dep_emp_firstName varchar(255) not null, dep_emp_lastName varchar(255) not null, dep_name varchar(255) not null, primary key (dep_emp_firstName, dep_emp_lastName, dep_name, type))
    07:55:18,511 ERROR SchemaExport:427 - DB2 SQL Error: SQLCODE=-613, SQLSTATE=54008, SQLERRMC=DEP_EMP_FIRSTNAME..., DRIVER=4.17.29

---> it works if these columns are trimmed to a smaller max. size, eg. 80

Comment 1 Jan Martiska 2016-01-19 07:24:40 UTC
Upstream issue: https://hibernate.atlassian.net/browse/HHH-10457
PR sent to upstream component: https://github.com/hibernate/hibernate-orm/pull/1225/files

Comment 2 Jan Martiska 2016-01-19 07:28:35 UTC
Does not seem to affect EAP 7.x because JBEAP-1595 is applied there

Comment 3 Mike McCune 2016-03-28 22:38:41 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 4 Jan Martiska 2016-04-07 08:16:12 UTC
Requires upgrade to Hibernate 4.2.23.Final (not yet released)

Comment 5 Gail Badner 2016-04-13 04:14:54 UTC
Should this block the component upgrade BZ: 
https://bugzilla.redhat.com/show_bug.cgi?id=1315479 ?

Comment 10 Jiří Bílek 2016-05-06 07:28:52 UTC
Verified with EAP 6.4.8.CP.CR2.

Comment 11 Petr Penicka 2017-01-17 12:39:10 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.


Note You need to log in before you can comment on or make changes to this bug.