SHARE
TWEET

Untitled

a guest Jul 19th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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[];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top