This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply 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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: join Hibernate query problem (Small problem)
 
Similar Threads
Hibernate: query returning data from multiple tables
Java Progarmming about Database
simple inner join question
java.lang.NumberFormatException: For input string: ""
Some question about Java Progarmming