1 Reply Latest reply on Feb 18, 2009 4:20 PM by Francisco Jose Peredo Noguez

    self-referencing table

    Carsten Reitemeyer Newbie
      Hello,

      can someone point me to a working seam example with self referencing tables.
      for example I have the following table:

      CREATE TABLE  `nets`.`network` (
        `id` int(11) NOT NULL auto_increment,
        `start_ip` bigint(20) NOT NULL,
        `end_ip` bigint(20) NOT NULL,
        `parent_id` int(11) default NULL,
        PRIMARY KEY  (`id`),
        UNIQUE KEY `id` (`id`),
        KEY `FK6DE15A2E76A8E91A` (`parent_id`),
        CONSTRAINT `fk_parentid_id` FOREIGN KEY (`parent_id`) REFERENCES `network` (`id`)
      )

      the crud ui generated by seam cannot handle this relation. the generated entity seems to be okay.

      thx
        • 1. Re: self-referencing table
          Francisco Jose Peredo Noguez Master

          Carsten Reitemeyer wrote on Feb 18, 2009 16:04:


          Hello,

          can someone point me to a working seam example with self referencing tables.
          for example I have the following table:



          There is no online example that I know of...



          ....

          the crud ui generated by seam cannot handle this relation. the generated entity seems to be okay.




          But I can point you to the relevant JIRA issue so that you can vote for them (if enough people vote for this, it will get the attention of the seam development team and will be fixed):



          JBSEAM-3454

          JBSEAM-3484

          JBSEAM-3493


          Oh, and if you are using seam-gen CRUD pages, you better be aware of:


          JBSEAM-3903


          I think all this could be solved by testing seam-gen using a a full real world database model, but I haven't find a good enough one (that is also an opensource one):


          JBSEAM-3615