HQL query joining three Hibernate entity classes

23 Views Asked by At

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.

The Entity Relationship Diagram (ERD)

0

There are 0 best solutions below