正在加载图片...
@Entity public class Orderltem implements Serializable private static final long serialVersionUID=-1166337687856636179L private Integer id: private String productname. private Float price private Order order. public Orderltem() public Orderltem(String productname,Float price) thisproductname=productname. this.price=price. QId agenerated value public Integer getld( return id. public void setld(Integer id) this.id=id; @Column(length=100.nullable=false) public String getProductname(){ return productname: } public void setProductname(String productname) this.productname productname; public Float getPrice retur price public void setPrice(Float price) this.priceprice: @ManyToOne(cascade-Cascade Type.REFRESH,optional=false) @JoinColumn(name ="order id") public Order getorder() return order; @Entity public class OrderItem implements Serializable { private static final long serialVersionUID = -1166337687856636179L; private Integer id; private String productname; private Float price; private Order order; public OrderItem() {} public OrderItem(String productname, Float price) { this.productname = productname; this.price = price; } @Id @GeneratedValue public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(length=100, nullable=false) public String getProductname() { return productname; } public void setProductname(String productname) { this.productname = productname; } public Float getPrice() { return price; } public void setPrice(Float price) { this.price = price; } @ManyToOne(cascade=CascadeType.REFRESH, optional=false) @JoinColumn(name = "order_id") public Order getOrder() { return order;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有