This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
 
Don't get me started about those stupid light bulbs.
 
subject: join Hibernate query problem (Small problem)
 
Similar Threads
java.lang.NumberFormatException: For input string: ""
Java Progarmming about Database
Some question about Java Progarmming
simple inner join question
Hibernate: query returning data from multiple tables