1 Reply Latest reply on Jun 27, 2006 11:11 AM by Chris Malan

    New User Question: Many to Many relationship Association

    Hassnain Badami Newbie

      Hi

      I am trying to code a many to many relationship between two entities. One of my entity is named View and the other is Column.

      I am trying to use the @JoinTable annotation and for the table property in the annotation I am specifying a table column_view (which I have created in the database).

      My associative table has other fields, apart from the primary key of view and column entities. This makes me feel that my current way of using @JoinTable would not work under this condition and I have to create two onetomany mappings like

      Column -> OnetoMany -> ColumnView <- OnetoMany <- View.

      Am I right in my approach or is there anyother way out to represent such manytomany relationships.