0 Replies Latest reply on May 6, 2010 4:05 AM by enrico valenti

    seam generated entities

    enrico valenti Newbie

      hi all, I'm trying to use the seam generate-entities command to generate entities(what else?) from a MySQL database with the following three tables:

      username char (PK)
      password char
      id bigint (PK)
      name char
      user (PK,FK)
      role (PK,FK)

      As result I expected only two entity classes, one for User with a @ManyToMany annotation, linking to the Role table, using the UserRole table as the joinTable, and another one for Role.
      Instead of it seam creates 4 classes, User, Role, UserRole and UserRoleId with User and Role linked to UserRole with a @OneToMany relationship.
      Is there any way to change this behaviour to have only two classes generated from the database?