2011-01-06 77 views
1

這是一種雙向的一對多關係嗎?這是一種雙向的一對多關係嗎?

艙位:

@OneToMany(cascade=(CascadeType.ALL), fetch=FetchType.EAGER, mappedBy = "customer") 
private List<Booking> bookings = new ArrayList<Booking>(); 

Customer類:

@ManyToOne(cascade={CascadeType.ALL}, fetch=FetchType.EAGER) 
@JoinColumn(name = "custNo", referencedColumnName = "customerNo") 
private Customer customer; 

回答