I have three Hibernate entity classes - Shipment, Parcel and User - mapping respectively tables shipments
, parcels
and users
(see attached db scheme). Parcels represent the "connection point" between a User and a Shipment as each parcel
has an user_id
and a shipment_id
.
What I need to do is write an HQL query that filters shipments by user_id
. How can I do that? Thanks.