my dog learned polymorphism*
The moose likes JSF and the fly likes join Hibernate query problem (Small problem) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "join Hibernate query problem (Small problem)" Watch "join Hibernate query problem (Small problem)" New topic
Author

join Hibernate query problem (Small problem)

Michael van Adrichem
Greenhorn

Joined: May 20, 2011
Posts: 7
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

Joined: Feb 13, 2009
Posts: 5
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.
 
 
subject: join Hibernate query problem (Small problem)