could not get a field value by reflection hibernate
Try changing the mapping annotations. Remove the @JoinColumn
annotation from ratingList
and add mappedBy
attribute:
@OneToMany(fetch = FetchType.EAGER, mappedBy = "user")
private List<Rating> ratingList = new ArrayList<Rating>();
where user
is the property name in the Rating
entity that has a @ManyToOne
association with User
.