I have the Report Class
public class Report{
private String nome;
@ManyToOne
@JoinColumn( name = "idpai", referencedColumnName = "id" )
private List<Report> subReports
getters e setters...
}
My question is how to do the annotation correctly, this way I'm getting this:
org.hibernate.AnnotationException: @OneToOne or @ManyToOne on br.com.koinonia.habil.model.user.Report.subReportProvider references an unknown entity: java.util.List
Since the SubReport list is an array of the Report class itself, that is, it is the same table.
How to proceed?