Hi,
I've got a very simple JPA unidirectional @OneToMany mapping and I'm getting an error. One CD has many Tracks, the CD owns the relationship:
Code:
@Entity
public class CD {
...
@OneToMany(cascade = CascadeType.ALL, orphanRemoval=true)
@JoinColumn(table="track", name="cd")
private List<Track> tracks
org.hibernate.cfg.NotYetImplementedException: Collections having FK in secondary table
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1562)
This happens whenever I use the @JoinColumn annotation (with or without the table attribute). Without the @JoinColumn annotation, it generates and uses a join table, which is not what I want for a OneToMany.
Hibernate 3.3.2.GA.
Surely simple OneToMany mappings like this are implemented, or have I got the annotation wrong in some way? This was reported previously but apparently not resolved:
viewtopic.php?p=2367398Note the bug seems to be in processing the annotation, not in generating/executing DDL, and occurs even if the schema has been created manually. The only bug I have found like this is
http://opensource.atlassian.com/project ... e/HHH-5091but that is apparently a later version.