Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. @ElementCollection
  2. @CollectionTable(name="mycourses",joinColumns=@JoinColumn(name="mysid"))@Column(name="courseName")
  3. private String course[];
  4. The above code gives exception
  5. i get the following exception -
  6. org.hibernate.AnnotationException: List/array has to be annotated with an @OrderColumn (or @IndexColumn): collection.Student1.course
  7. @ElementCollection
  8. @CollectionTable(name="mycourses",joinColumns=@JoinColumn(name="mysid"))@Column(name="courseName")
  9. @OrderColumn
  10. private String course[];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement