[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1820) unique=true attribute of primary key in generated class prevents the schema to be regenerated

Ali Sadik Kumlali (JIRA) jira-events at lists.jboss.org
Sun Aug 19 18:54:00 EDT 2007


unique=true attribute of primary key in generated class prevents the schema to be regenerated
---------------------------------------------------------------------------------------------

                 Key: JBSEAM-1820
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1820
             Project: JBoss Seam
          Issue Type: Bug
          Components: Tools
    Affects Versions: 2.0.0.BETA1
         Environment: OS: Windows Vista 6.0,x86
Database: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Java VM: Java HotSpot(TM) Server VM 1.5.0_11-b03,Sun Microsystems Inc.
Seam: jboss-seam-2.0.0.BETA1
            Reporter: Ali Sadik Kumlali
            Priority: Trivial


Following steps causes 

- Create a table using following script:

CREATE TABLE PEOPLE ("ID" NUMBER NOT NULL, "SURNAME" VARCHAR2(50 BYTE), "NAME" VARCHAR2(25 BYTE), CONSTRAINT "PEOPLE_PK" PRIMARY KEY ("ID"));

- Use seam generate-entities

- Annotation of primary key column(ID) found in People.java should have "unique = true" attribute:

        @Id
        @Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
        @NotNull
        public BigDecimal getId() {
               return this.id;
        }

- Drop the PEOPLE table:

DROP TABLE "PEOPLE" CASCADE CONSTRAINTS;

- To force the schema generated from entity class, redeploy application: 

seam deploy



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

        



More information about the seam-issues mailing list