3 Replies Latest reply on Aug 30, 2008 10:13 AM by Pierre Raoul

    CRUD with entity relationship

    Sachin Sawashe Newbie

      Thanks for providing seam-gen and the facility to create CRUD .
      Its really fast and simple. Also this feature is great for ‘Master Tables’ for almost all projects.

      I would like to know if the CRUD entities support relationhip..Let me explain it in more details

      I have got 2 entities
      Book (id,name,publisherId)

      Relation – One book can have one publisher. A publisher can publish many books.

      When I created the tables in MySQL and also created Model Classes for these  Entities  with  a  @ManyToOne relation for publisherId in the Books Model class

      I used ‘Generate  Seam Entities’ with ’Use existing entities’ as Genetation mode.
      This gave me all the screens  .But the Add Books screen had a separate tab to select the Publisher.

      Instead I would prefer to have a list of Publishers in a select/dropdown box .. is there any simple trick to achieve this.