Hello,
I am trying to figure out how to add primary keys on joined table generated by Hibernate.
So if i add something like this in my parent class:
@OneToMany(cascade=CascadeType.ALL) @LazyCollection(LazyCollectionOption.FALSE) @Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.DELETE_ORPHAN}) @JoinTable(name="ATTRIBUTE_LINK") private List<Attribute> Attributes;
Hibernate create this ATTRIBUTE_LINK table which link the parent object to one or many attributes in ATTRIBUTES table. However that ATTRIBUTE_LINK table does not have any primary key column. is there a way to insert a primary key in that table also?
thanks
Seb
|