[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4773?page=c...
]
Strong Liu updated HHH-4773:
----------------------------
Description:
@CollectionId describes an identifier column for a bag (ie an idbag).
but it does not force the id to be not null.
this can be reproduced by
org.hibernate.test.annotations.collectionelement.indexedCollection.IndexedCollectionOfElementsTest
on DB2 (because of DB2 has more restrict validation seems, it does not allow nullable
column to be primary key)
was:
org.hibernate.search.test.embedded.EmbeddedTest.testIndexedEmbeddedAndCollections
Column 'CUST_NAME' is part of a primary key constraint and cannot be null.
org.hibernate.test.annotations.target.TargetTest.testTargetOnMapKey
19:47:29,104 DEBUG SchemaExport:377 -
create table Brand_LuggageImpl (
Brand_id bigint not null,
luggagesBySize_id bigint not null,
name varchar(255),
primary key (Brand_id, name)
)
19:47:29,129 ERROR SchemaExport:348 - Unsuccessful: create table Brand_LuggageImpl
(Brand_id bigint not null, luggagesBySize_id bigint not null, name varchar(255),
primary key (Brand_id, name))
org.hibernate.test.annotations.collectionelement.indexedCollection.IndexedCollectionOfElementsTest.testIndexedCollectionOfElements
create table contact (
n_key_person integer not null,
name varchar(255),
n_key_contact bigint,
primary key (n_key_contact)
)
19:45:24,074 ERROR SchemaExport:348 - Unsuccessful: create table contact (n_key_person
integer not null, name varchar(255), n_key_contact bigint, primary key (n_key_contact))
19:45:24,073 ERROR SchemaExport:349 - DB2 SQL error: SQLCODE: -542, SQLSTATE: 42831,
SQLERRMC: N_KEY_CONTACT
org.hibernate.test.annotations.any.AnyTest.testManyToAnyWithMap
19:43:44,418 DEBUG SchemaExport:377 -
alter table map_properties
add constraint FKF2788BF69AF4A643
foreign key (map_id)
references property_map
19:43:44,420 ERROR SchemaExport:348 - Unsuccessful: alter table map_properties add
constraint FKF2788BF69AF4A643 foreign key (map_id) references property_map
19:43:44,420 ERROR SchemaExport:349 - DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704,
SQLERRMC: HIBBR330.MAP_PROPERTIES
org.hibernate.test.annotations.identifiercollection.IdentifierCollectionTest.testIdBag
19:44:05,449 DEBUG SchemaExport:377 -
create table PASSPORT_STAMP (
Passport_passport_id bigint not null,
stamps_id bigint not null,
COLLECTION_ID bigint,
primary key (COLLECTION_ID)
)
19:44:05,494 ERROR SchemaExport:348 - Unsuccessful: create table PASSPORT_STAMP
(Passport_passport_id bigint not null, stamps_id bigint not null, COLLECTION_ID bigint,
primary key (COLLECTION_ID))
19:44:05,493 ERROR SchemaExport:349 - DB2 SQL error: SQLCODE: -542, SQLSTATE: 42831,
SQLERRMC: COLLECTION_ID
19:44:05,494 DEBUG SchemaExport:377 -
create table PASSPORT_VISASTAMP (
Passport_passport_id bigint not null,
visaStamp_id bigint not null,
COLLECTION_ID bigint,
primary key (COLLECTION_ID)
)
19:44:05,526 ERROR SchemaExport:348 - Unsuccessful: create table PASSPORT_VISASTAMP
(Passport_passport_id bigint not null, visaStamp_id bigint not null, COLLECTION_ID bigint,
primary key (COLLECTION_ID))
19:44:05,525 ERROR SchemaExport:349 - DB2 SQL error: SQLCODE: -542, SQLSTATE: 42831,
SQLERRMC: COLLECTION_ID
org.hibernate.test.annotations.indexcoll.IndexedCollectionTest.testRealMap
19:46:31,064 DEBUG SchemaExport:377 -
create table Atmosphere_Gas (
Atmosphere_id integer not null,
gases_id integer not null,
gas_name varchar(255),
primary key (Atmosphere_id, gas_name)
)
19:46:31,093 ERROR SchemaExport:348 - Unsuccessful: create table Atmosphere_Gas
(Atmosphere_id integer not null, gases_id integer not null, gas_name varchar(255), primary
key (Atmosphere_id, gas_name))
19:46:31,094 ERROR SchemaExport:349 - DB2 SQL error: SQLCODE: -542, SQLSTATE: 42831,
SQLERRMC: GAS_NAME
org.hibernate.test.annotations.collectionelement.CollectionElementTest
19:45:09,816 DEBUG SchemaExport:377 -
create table Matrix_values (
Matrix_id integer not null,
element float,
mapkey integer,
primary key (Matrix_id, mapkey)
)
19:45:09,844 ERROR SchemaExport:348 - Unsuccessful: create table Matrix_values (Matrix_id
integer not null, element float, mapkey integer, primary key (Matrix_id, mapkey))
19:45:09,845 ERROR SchemaExport:349 - DB2 SQL error: SQLCODE: -542, SQLSTATE: 42831,
SQLERRMC: MAPKEY
19:45:09,844 DEBUG SchemaExport:377 -
create table ScorePerNickName (
BoyId integer not null,
fld_score integer,
mapkey varchar(255),
primary key (BoyId, mapkey)
)
19:45:09,872 ERROR SchemaExport:348 - Unsuccessful: create table ScorePerNickName (BoyId
integer not null, fld_score integer, mapkey varchar(255), primary key (BoyId, mapkey))
19:45:09,871 ERROR SchemaExport:349 - DB2 SQL error: SQLCODE: -542, SQLSTATE: 42831,
SQLERRMC: MAPKEY
19:45:09,871 DEBUG SchemaExport:377 -
create table TestCourse (
testCourseId bigint generated by default as identity,
primary key (testCourseId)
)
19:45:09,920 DEBUG SchemaExport:377 -
create table TestCourse_variations (
TestCourse_testCourseId bigint not null,
element varchar(255),
language_code varchar(255),
primary key (TestCourse_testCourseId, language_code)
)
19:45:09,944 ERROR SchemaExport:348 - Unsuccessful: create table TestCourse_variations
(TestCourse_testCourseId bigint not null, element varchar(255), language_code
varchar(255), primary key (TestCourse_testCourseId, language_code))
19:45:09,946 ERROR SchemaExport:349 - DB2 SQL error: SQLCODE: -542, SQLSTATE: 42831,
SQLERRMC: LANGUAGE_CODE
Fix Version/s: 3.5.x
3.3.x
Component/s: (was: testsuite)
annotations
Environment: (was: db2)
Summary: @CollectionId does not force the id column to not-null (was: unit
tests fail cos db2 doesn't allow primary key column nullable)
@CollectionId does not force the id column to not-null
------------------------------------------------------
Key: HHH-4773
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4773
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Affects Versions: 3.3.2, 3.5.0.Beta-1, 3.5.0-Beta-2
Reporter: Strong Liu
Assignee: Strong Liu
Fix For: 3.3.x, 3.5.x
@CollectionId describes an identifier column for a bag (ie an idbag).
but it does not force the id to be not null.
this can be reproduced by
org.hibernate.test.annotations.collectionelement.indexedCollection.IndexedCollectionOfElementsTest
on DB2 (because of DB2 has more restrict validation seems, it does not allow nullable
column to be primary key)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira