This content has been marked as final.
Show 2 replies
-
1. Re: @OneToMany with String as the many
andydale Dec 18, 2006 3:52 AM (in response to vk101)Hi,
try to annotate it with org.hibernate.annotations.CollectionOfElements.
Cheers,
Andy -
2. Re: @OneToMany with String as the many
vk101 Dec 18, 2006 10:23 PM (in response to vk101)Thanks, that worked.
When validating the FirstNames with Hibernate Validation annotations, what would you annotate? The collection's getter (i.e. getFirstNames()) or the getter of the individual element (i.e. getFirstName())?
In the collection's getter, I was surprised to find that the unique column was created on the database table when I entered @Column(unique=true). It was created on the correct column of the generated table for storing the elements. So if that works, should I be able to put all annotations there or should I put it on the getter method bound to the firstName form field?