• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

HQL join returns no results.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Mark A. Espinoza
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic