When using Hibernate Annotations on a List<String>, is there a way to change the column name for the strings?
Code:
@org.hibernate.annotations.CollectionOfElements()
@org.hibernate.annotations.IndexColumn(name = "sortOrder", nullable = false)
@JoinTable(name = "LitAuthors", joinColumns = @JoinColumn(name = "literatureId"))
public List<String> getAuthors();
Using the above, Hibernate expects that the LitAuthors table have 3 columns: literatureId, sortOrder, and element. How can I change the column name from "element" to something else?
I've tried @Column(name = "author") but that doesn't work. What am I missing?
Thanks!