Miscellany
public text v1 · immutable@Entity
@Table(name="timetables")
public class Stop {
@Id @GeneratedValue
public int getGuid() { return guid; }
public void setGuid(int guid) { this.guid = guid; }
}
@Entity
@Table(name = "route_runs")
public class ServiceRun {
//...
@OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
@JoinColumn(name="runID")
public List<Stop> getStops() { return stops; }
public void setStops(List<Stop> stops) {
this.stops = stops;
}
}