@Entitypublic class Boards { @Id @GeneratedValue private Long id; @OneToMany @JoinTable (name = "boards_childboxes", joinColumns = @JoinColumn(name="boardId"), inverseJoinColumns = @JoinColumn(name="childBoxId") ) private Collection<Boxes> childBoxList = new ArrayList<Boxes>();--------------------public class Boxes { @Id @GeneratedValue private Long id; @ManyToOne private Boards parentBoard;-----------pgAdmin 3 note:dit table data without primary keySince the table public.boards_childboxes doesn't have a primary key or OIDs, you can view the data only. Inserting new rows and changing existing rows isn't possible for the Edit Data tool without primary key. In order to edit data, pgAdmin III requires a primary key on the table, which is a good database design practice anyway. Alternatively, the table can be created WITH OIDS. Please note that oids are not guaranteed to be unique over a very long period of time, so using oids as kind-of primary key is only second choice. ---------