All pastes #460692 Raw Edit

Miscellany

public text v1 · immutable
#460692 ·published 2007-04-27 06:53 UTC
rendered paste body
@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; 
    }
}