package org.hibernate.jpa.test;
@Entity
public class Product {
@Id
@GeneratedValue
private Integer id;
@OneToMany(fetch = LAZY, cascade = ALL, orphanRemoval = true)
private List<Widget> widgets;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public void setWidgets(List<Widget> widgets) {
this.widgets = widgets;
}
}