[
http://jira.jboss.com/jira/browse/EJBTHREE-132?page=comments#action_12316813 ]
Stefan Lindner commented on EJBTHREE-132:
-----------------------------------------
The same happens if I define the column like this:
@Id
@Column(
name="id",
nullable=false,
updatable=false,
length=12,
columnDefinition="varchar(12)"
)
and the uniqeness of the column directly in the entity definition like this:
@Entity()
@Table( name = "entity_a", [EMAIL PROTECTED](columnNames={"id"})})
> primary key and unique should generate only one index
> -----------------------------------------------------
>
> Key: EJBTHREE-132
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-132
> Project: EJB 3.0
> Type: Bug
> Components: EJB3 Extensions
> Versions: Preview 5
> Environment: JBoss 4.0.2RC1, EJB3 preview 5, Java 1-5_02, WinXPSP2, DBMS
> Ingres R3.0.2
> Reporter: Stefan Lindner
> Priority: Minor
>
>
> An entity with a column definition like
> @Column(
> name="id",
> primaryKey=true,
> unique=true,
> nullable=false,
> updatable=false,
> length=12,
> columnDefinition="varchar(12)"
> )
> leads to the error messages
> ERROR [SchemaExport] Unsuccessful: create table entity_a (id varchar(12)
> not null unique, description varchar(50) not null, display_value varchar(12)
> not null unique, primary key (id))
> ERROR [SchemaExport] CREATE TABLE: UNIQUE constraints have conflicting
> sets of columns.
> The set of columns of one UNIQUE constraint cannot be the same as the set
> of columns of another UNIQUE constraint on the same table.
> when the database table should be generated automatically.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development