I'd like to implement a One-To-Many relationship between my entity class and a set of Integers.
in pseudo code...
Code:
@Entity
public class MyClass{
@Id
@GeneratedValue
private Integer id;
// what to do here
private Set<Integer> scores;
}
Has anyone got this to work? Ideally I'd like the join table to contain 2 columns, the id of MyClass and a value of scores. The only example hibernate provides is for mapping relationships between two entity classes.
I found information in the links below, but am not sure how/if the issue is resolved. I cant find any information on the @javax.ejb.AssociationTable that the first link mentions.
http://opensource.atlassian.com/projects/hibernate/browse/ANN-19and
https://forum.hibernate.org/viewtopic.php?t=938240using hibernate-3.6.0-final, hibernate annotations 3.4.0.GA, jdk-1.6.0.17