[hibernate-issues] [Hibernate-JIRA] Reopened: (HHH-5376) Tests contain invalid SQL

Gail Badner (JIRA) noreply at atlassian.com
Tue Jul 13 15:28:13 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner reopened HHH-5376:
------------------------------


I missed the comment about Class$methodName, which does not duplicate HBX-978.

> 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
>            Assignee: Gail Badner
>
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list