Hi,
so i found the problem but no solution. The problem is that the foreign key of the referenced "Word" is inside the Join-Table marked as unique, which I switched manually to index.
Anyone got any clues on how I can avoid the word_content being unique in the join table? Thanks!!
[code]
@OneToMany
@JoinTable(name="sentence_word",
joinColumns={@JoinColumn(name="sentence_id")},
inverseJoinColumns={@JoinColumn(name="word_content",referencedColumnName="content")})
/**
* @return the words
*/
public Collection<Word> getWords() {
return words;
}
[/code]
|