| I believe this is not a issue. [@CollectionTable.JoinColumns()][1] is used to set the foreign key columns of the collection table which reference the primary table of the entity, which means that once you set this optional property, there is no necessary to "manually" reference back from @embeddable to its parent. Use your case as example: @Entity public class Image { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; .... @ElementCollection(fetch = FetchType.LAZY) @CollectionTable(name = "COMPUTERS", joinColumns = @JoinColumn(name = "ID_IMAGE")) private List<Computer> computers; } @Embeddable public class Computer { @Column private String ipAddress; *****//This idImage field is not necessary @Column(name = "ID_IMAGE", insertable = false, updatable = false) private Long idImage;***** } Once comment out the field idImage and its @Column annotation, the generated SQl is: create table IMAGES ( id bigint not null, Name_Image varchar(255), primary key (id) ) create table COMPUTERS ( ID_IMAGE bigint not null, ipAddress varchar(255) ) alter table COMPUTERS add constraint FKl1ucm93ttye8p8i9s5cgrurh foreign key (ID_IMAGE) references IMAGES [1]: http://docs.oracle.com/javaee/6/api/javax/persistence/CollectionTable.html#joinColumns() |