oneToMany relationship, in which the source table column does NOT contain a unique
constraint
---------------------------------------------------------------------------------------------
Key: ANN-680
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-680
Project: Hibernate Annotations
Issue Type: New Feature
Affects Versions: 3.2.1
Environment: annotations version 3.2.1.ga, java 1.5
Reporter: Sabina Schneider
I am particulary interested in generating a oneToMany relationship, in which the source
table column does NOT contain a unique constraint. Nevertheless, specifying the
referencedColumnName creates a unique constraint. How can I avoid this? This is the code:
@OneToMany(targetEntity = AppleGenre.class, fetch=FetchType.LAZY)
@LazyCollection(LazyCollectionOption.EXTRA)
@JoinTable(name = "APPLE_FEATURE",
joinColumns = { @JoinColumn(name = "APPLEID",
referencedColumnName="APPLE_ID",
unique=false, nullable=false, insertable=false, updatable=false ) },
inverseJoinColumns = { @JoinColumn(name = "WORD",
referencedColumnName="APPLEGENREID ",
unique=false, nullable=false, insertable=false, updatable=false) }
)
public List<SoftGenre> getSoftGenres(){
return softGenres;
}
APPLE_ID is NOT unique and APPLEGENREID is PK of AppleGenre
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira