I have a
org.hibernate.AnnotationException: Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: Forms.CarsRentalOrder.OrderUnits
on this code:
@Entity
public class CarsRentalOrder implements Serializable {
@ManyToMany
private List<Vehicle> OrderUnits;
//methods and variables
}
what is the problem? I saw in some place that list is a collection, and u can make @ManyToMany
and @OneToMany
attribute.
Thanks!!