I've been playing with (seam-)gen the last few days and today I decided to upgrade to Seam 1.1 GA. I was very impressed by its capabilities, however with the last release I run into an stackoverflow error doing seam generate-entites which didn't occur on the CR2 release. The tables I refer to are self referential (child parent) and leaving out the reference to itself solves the problem but that's not realy an option for me now.
create table if not exists subject ( subjectid INTEGER NOT NULL AUTO_INCREMENT , info varchar(150) , firstname varchar(50) , lastname varchar(50) NOT NULL , email varchar(70) , PRIMARY KEY (subjectid) ) TYPE = InnoDB; create table if not exists role ( roleid INTEGER NOT NULL AUTO_INCREMENT , info varchar(150) , parentid INTEGER , name varchar(50) NOT NULL , PRIMARY KEY (roleid) , INDEX parent_ind (parentid) , FOREIGN KEY (parentid) references role (roleid) ) TYPE=InnoDB;
I'm not really sure what I can do about that. I see why it would happen .... but I'm not sure that I have any good way to detect cycles in the relationships.
You can workaround by temporarily dropping the FK constraint from the database while reverse engineering.