Can anyone help me convert this query to HQL
SELECT
supplierOrderDetails.productID,< br /> supplierOrderDetails.orderQty,
supplierOrderReceiveDetail.qtyArrived
FROM
supplierOrder
INNER JOIN
supplierOrderDetails
ON
(supplierOrderDetails.supplierOrderID = supplierOrder .ID)
INNER JOIN
supplierOrderReceive
ON
(supplierOrderReceive.supplierOrderID = supplierOrder.ID)
INNER JOIN
supplierOrderReceiveDetail
ON
(supplierOrderReceiveDetail.supplierOrderReceiveID = supplierOrderReceive.ID)
AND
(supplierOrderReceiveDetail.ProductID = supplierOrderDetails.ProductID)
WHERE supplierOrder.ID = 1
This is a table relationship
I have added a query for those who want to know how to add multiple tables in HQL< p>
SELECT supplierOrderDetails.productID as product, supplierOrderDetails.orderQty as orderedQty,sum(supplierOrderRec eiveDetail.qtyArrived) as qtyArrived
FROM SupplierOrder as so, SupplierOrderDetails as supplierOrderDetails, SupplierOrderReceiveDetail as supplierOrderReceiveDetail, SupplierOrderReceive as supplierOrderReceive
INNER JOIN supplierOrderDetails.supplierOrderID
INNER JOIN supplierOrderReceive.supplierOrder
INNER JOIN supplierOrderReceiveDetail.supplierOrderReceive
GROUP BY supplierOrderDetails.productID, supplierOrderDetails.orderQty
Can anyone help me convert this query to HQL
SELECT
supplierOrderDetails.productID,
supplierOrderDetails.orderQty,
supplierOrderReceiveDetail.qtyArrived
FROM
supplierOrder
INNER JOIN
supplierOrderDetails
ON
(supplierOrderDetails.supplierOrderID = supplierOrder.ID)
INNER JOIN < br /> supplierOrderReceive
ON
(supplierOrderReceive.supplierOrderID = supplierOrder.ID)
INNER JOIN
supplierOrderRecei veDetail
ON
(supplierOrderReceiveDetail.supplierOrderReceiveID = supplierOrderReceive.ID)
AND
(supplierOrderReceiveDetail.ProductID = supplierOrderDetails.ProductID)
WHERE supplierOrder.ID = 1
This is a table relationship
I have added a query for those who want to know how to add multiple tables in HQL
p>
SELECT supplierOrderDetails.productID as product, supplierOrderDetails.orderQty as orderedQty,sum(supplierOrderReceiveDetail.qtyArrived) as qtyArrived
FROM SupplierOrder as so, SupplierOrderDetails as supplierOrderDetails, SupplierOrderReceiveDetail as supplierOrderReceiveDetail, SupplierOrderReceive as supplierOrderReceive
INNER JOIN supplierOrderDetails.supplierOrderID
INNER JOIN supplierOrderReceive.supplierOrder
INNER JOINive orderReceiveDetail.supplierOrderReceive
GROUP BY supplierOrderDetails.productID, supplierOrderDetails.orderQty