• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

join Hibernate query problem (Small problem)

 
Michael van Adrichem
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • 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

 
Jean Baldessar
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic