posted 14 years ago
Hello all,
I am new to hibernate and am having trouble with making a join query in HQL.
This is between 2 classes with a one-to-many/many-to-one relationship.
I am trying to join in the second class based on matches between 2 columns,
where classA.jono = classB.jono. The relationship is one classA to many classB.
I am using a join table. I excluded the attributes I don't use in this query.
I am running this query in the eclipse HQL editor.
classA(Ent24DigB):
classB(EntTrmsJono):
The valid SQL that works is the following:
My HQL running is Eclipse HQL editor:
The HQL will run, no exceptions, warnings, or errors, but will return nothing.
The corresponding join table is empty.
Do I fill it? Does the query fill it? Do I use the "jono" columns somehow in my <set>
declaration? I am lost...despair....must finish...cough...cough. :P
Do you see me needing anything else in my collection definition?
I am running MySQL 5.1 Hibernate 3.3, Hibernate tools 3.2 Eclipse Galileo. Windows XP(not by choice).
Any help appreciated. Let me know of any more details you require.
thanks,
Mark