• 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

join Hibernate query problem (Small problem)

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all,

I have a small problem.

I have two tables. The table Personeel and the table succes.

What i wanna do is get the data from both personeel and succes, but i dont want duplicates.

So the query i use is:


It now nicely displays only the personeels records that are linked to the table succes.
However, it is not showing the data from the table succes, only from the personeel table.

What am i missing in my query that it also shows the data from the succes table?

Greetings,

Zylox

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean with "However, it is not showing the data from the table succes, only from the personeel table."

The succeses atribute must came loaded in the Personeel objects, not in an array if it's what you hoping for...

You can try 'from Personeel p, s join fetch p.succeses as s' but the first way is better.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic