[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4450) Seam gen does not cope well with a with recursive schema

Shaun Appleton (JIRA) jira-events at lists.jboss.org
Tue Oct 20 08:00:05 EDT 2009


Seam gen does not cope well with a with recursive schema
--------------------------------------------------------

                 Key: JBSEAM-4450
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4450
             Project: Seam
          Issue Type: Bug
          Components: Tools
    Affects Versions: 2.0.2.SP1
            Reporter: Shaun Appleton


Generate the following schema (in hypersonic) -


CREATE TABLE COLOR
(  
CODIGO INTEGER,
DESIGNACAO VARCHAR(30) NOT NULL,
CONSTRAINT ARMAZENS_CP11 PRIMARY KEY (CODIGO)
)  


CREATE TABLE ARTICLE
(        
CODIGO VARCHAR(15),
DESIGNACAO VARCHAR(50),
C_COLOR INTEGER,
   CONSTRAINT ARTIGOS_CP11 PRIMARY KEY (CODIGO),
   CONSTRAINT ARTIGOS_CE121 FOREIGN KEY (C_COLOR) REFERENCES COLOR(CODIGO)
)

CREATE TABLE ARTICLE_ROW
(        
C_ARTIGO VARCHAR(15),
C_COLOR INTEGER,
   OBSERVACOES VARCHAR(4000),
   CONSTRAINT REL_ART_ARM_CP11 PRIMARY KEY (C_ARTIGO, C_COLOR),
CONSTRAINT REL_ART_ARM_CE11 FOREIGN KEY (C_ARTIGO) REFERENCES ARTICLE (CODIGO),
   CONSTRAINT REL_ART_ARM_CE21 FOREIGN KEY (C_COLOR) REFERENCES COLOR(CODIGO)
)

insert into article(codigo, designacao) values ('1', 'article 1')
insert into article(codigo, designacao) values ('2', 'article 2')

insert into color(codigo, designacao) values (1, 'blue')
insert into color(codigo, designacao) values (2, 'red')
insert into color(codigo, designacao) values (3, 'green') 

reverse engineer the schema  (I used JBDS) and deploy.

a) Select Article List
b) Select edit to edit an article
c) Select a color - green for example
d) Select articleRows (still with edit article)
e) Select Add Article row - notice color is as in step c even though in DB it is null.

Debugging this shows that within ArticleRowHome ColorHome is being re-used from the previous edit of article. Whereas ArticleRow.color is not yet defined.

This appears to be the first issue described in https://jira.jboss.org/jira/browse/JBSEAM-3454 (but not reported there).




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list