Hi, I have a one-to-many relationship based on a join table defined this way:
Code:
@OneToMany(targetEntity = SoftGenre.class, fetch=FetchType.LAZY)
@LazyCollection(LazyCollectionOption.EXTRA)
@JoinTable(name = "PROGRAMME_FEATURE",
joinColumns = { @JoinColumn(name = "PROGRAMMEID", referencedColumnName="PROGRAMME_ID", unique=false, nullable=false, insertable=false,updatable=false ) },
inverseJoinColumns = { @JoinColumn(name = "WORD", referencedColumnName="SOFTGENREID", unique=false, nullable=false, insertable=false,updatable=false) })
The column PROGRAMME_ID of the source entity is not a PK (and is not UNIQUE).
When running hbm2ddl to create/update my schema, a UNIQUE constraint is created for this column, even when it's annotated as unique=false.
How can I solve this?
Thanks,
Juan