This week's book giveaway is in the JDBC and Relational Databases forum.
We're giving away four copies of Murach's MySQL and have Joel Murach on-line!
See this thread for details.
Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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?
reply
    Bookmark Topic Watch Topic
  • New Topic