我有三张表
Order表
(主键)
ID ORDER_CODE STATUS
1 jialhe001 ORDERED
2 jialhe002 ORDERED
OrderProduct表
(主键)
ID ORDER_ID QTY PROD_CODE
1 1 10 XXD
2 1 12 YYD
Product表
(主键)
PROD_CODE description price
XXD toys 12
YYD cars 10
现在我需要 product.description, product.price, order.status, orderproduct.qty这些值
需要怎么写连接查询呢?
情景:我需要客户查一个order,需要返回order里面的产品,产品描述,价格。这个order的状态,还有每样商品的数量
多谢大家。。新手HIBERNATE 不太会多连接查询