Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ElementCollection
- @CollectionTable(name="mycourses",joinColumns=@JoinColumn(name="mysid"))@Column(name="courseName")
- private String course[];
- The above code gives exception
- i get the following exception -
- org.hibernate.AnnotationException: List/array has to be annotated with an @OrderColumn (or @IndexColumn): collection.Student1.course
- @ElementCollection
- @CollectionTable(name="mycourses",joinColumns=@JoinColumn(name="mysid"))@Column(name="courseName")
- @OrderColumn
- private String course[];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement