In entity bean, the foreign key usually replaced by the referential relationship such as : public class Status implements Serializable { /** * */ private static final long serialVersionUID = 1L; @Column(name="creation_datetime", nullable = false) private Timestamp creationDatetime; @Id @Column(name="seq_no", nullable = false) @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer seqNo; @Column(name="status", nullable = false) private String status; @Column(name="car_id", nullable = false, insertable=false, updatable=false) private String carId; @ManyToOne @JoinColumn(name = "car_id") private Transaction transaction; public Status() { } public Status(Timestamp creation_datetime, Transaction transaction, Integer seqNo, String status, String carId) { this.creationDatetime = creati
留言
張貼留言