posted 11 years ago
Given the really stripped-down essence of two classes
and
and that the relationship table does get filled in with the district-school id mappings,
how would I write the following straight-SQL query
" select aa.name, bb.name FROM districts AS aa
JOIN school_district_relationship AS rr
ON aa.id = rr.id_district
JOIN schools AS bb
ON bb.id = rr.id_school
ORDER BY 1,2
;
in Hibernate's HQL? Nothing I've tried in HQL works except for the simplest " FROM Districts" Trying
I need an HQL query that will generate:
name | name
=================
ALAMEDA | KENNEDY
ALAMEDA | SHRIRE
FREEMONT | TOBIAS
FREEMONT | UNDERWOOD
FREEMONT | WATERFORD
Any hints/suggestions/constructive critisms and especially examples are always greatly appreciated!
TIA,
Still-learning Stuart