In this doc we can see example of usage @CollectioTable
annotation
I wrote the same code
@Entity public class Person {
@ElementCollection
@CollectionTable(name="HOMES", joinColumns = @Column(name = "PERSON_ID"))
@Column(name="HOME_STATE")
protected List<String> vacationHomes;
...
}
Usinf Hibernate-jpa-2 version 1.0.0.Final
Deploy on JBoss 4.3.0.GA
And get exception (while deploying), that column HOME_STATE cann't be mapped on java.util.List
so I change List to ArrayList
After that application was deployed well.
But doesn't work well! I execute simple query, but annotations @ElementCollection
and @CollectionTable
were ignored! Working only @Column
annotation
Can be problem with old JBoss version?
I don't know where problem...