Hello, I am trying to create a many-to-many relationship between Events and Products using the Oracle9 dialect. My version and annotations are listed below. The problem is that no composite primary key is created on the JoinTable. I got it to create a unique constraint instead using the uniqueConstraints attribute, but I would like Hibernate to create a true primary key. Is this possible? Thank you.
Hibernate version:
3.2.1.ga
Mapping documents:
@ManyToMany(cascade={}, fetch=FetchType.LAZY, mappedBy="")
@JoinTable(name = "EVENT_PRODUCTS",
uniqueConstraints = @UniqueConstraint(columnNames={"EVENT_ID", "PRODUCT_ID"}),
joinColumns = @JoinColumn(name = "EVENT_ID", referencedColumnName = "id", nullable = false, updatable = false),
inverseJoinColumns = @JoinColumn(name = "PRODUCT_ID", referencedColumnName = "id", nullable = false, updatable = false))
|