one to many mapping to a property of superclass
问题 I have a superclass Questions and its subclass MultipleChoiceQuestions Superclass has a field activity I want to create a Set<MultipleChoiceQuestions> and use OneToMany annotation using mappedBy = "activity" e.g. @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy = "activity" ) private Set<NQIMultipleChoiceQuestions> mcqQuestions = new HashSet<NQIMultipleChoiceQuestions>(); I am getting this error: org.hibernate.AnnotationException: mappedBy reference an unknown target