[jboss-user] [EJB 3.0] - Re: @OneToMany with String as the many

lightbulb432 do-not-reply at jboss.com
Mon Dec 18 22:23:59 EST 2006


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994865#3994865

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994865



More information about the jboss-user mailing list