我有桌子 令(orderno,订购日期,suppid) 供应商(suppid,suppname) ORDERDETAILS(orderdetailid,orderno) 如何使用JPA orderno,orderdate,suppname,orderdetailid?
获得这样的结果答案 0 :(得分:0)
@ManyToOne
@Fetch(FetchMode.JOIN)
@JoinColumn(name="suppid",nullable=false,insertable=false,updatable=false)
private Supplier supplierDetails;
This will Join one table to another and fetch the record for you.This code should be inside Order table POJO. and getter setter of supplier details as well.