I have same question which was answered in hibernate 3 here. However, I can't apply this to hibernate 4 as there is no @CollectionOfElements annotation. Can someone provide the solution that can be executed using hibernate 4?
EDIT: changed @CollectionOfElements to @ElementCollection worked for me. What should I do with @JoinTable now, because there is no table field in there.