Tests contain invalid SQL
-------------------------
Key: HHH-5376
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5376
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.x
Environment: Using HSQLDB 2.0.1 and Hibernate trunk (12 July 2010)
Reporter: Fred Toussi
These create table statements declare both primary key and unique constraints on the same
set of columns. This is against the SQL standard and will fail with most databases.
public class DerivedIdentitySimpleParentSimpleDepTest extends TestCase {
22:52:06,265 ERROR SchemaExport:386 - Unsuccessful: create table MedicalHistory
(lastupdate date, FK varchar(255) not null, primary key (FK), unique (FK))
22:52:06,265 ERROR SchemaExport:387 - a UNIQUE constraint already exists on the set of
columns in statement [create table MedicalHistory (lastupdate date, FK varchar(255) not
null, primary key (FK), unique (FK))]
public class DerivedIdentityIdClassParentSameIdTypeIdClassDepTest extends TestCase {
public void testOneToOneExplicitJoinColumn() throws Exception {
23:16:18,328 DEBUG SchemaExport:415 -
create table MedicalHistory (
FK1 varchar(255) not null,
FK2 varchar(255) not null,
primary key (FK1, FK2),
unique (FK1, FK2)
)
23:16:18,328 ERROR SchemaExport:386 - Unsuccessful: create table MedicalHistory (FK1
varchar(255) not null, FK2 varchar(255) not null, primary key (FK1, FK2), unique (FK1,
FK2))
23:16:18,328 ERROR SchemaExport:387 - a UNIQUE constraint already exists on the set of
columns in statement [create table MedicalHistory (FK1 varchar(255) not null, FK2
varchar(255) not null, primary key (FK1, FK2), unique (FK1, FK2))]
--
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