Register / Login
EJB and other Java EE Technologies
Append the result of a left join to an entity field
posted 1 year ago
: i used this query
"Select t From Thethread t LEFT JOIN FETCH t.threadVotes tv ON tv.user1=:currentUser ORDER BY t.datePosted"
I would like to get the result of this SQL query in an entity:
SELECT * FROM thethreads t LEFT JOIN thread_votes tv ON t.idthread=tv.thread AND tv.from_user like "currentUser";
Note that the joined result isn't part of my thethreads table:
Boost this thread!
EJBQL distinct issues
Recursive fetch join not recursively fetching all children
Difference between Fetch Join and inner join
JPA - getSingleResult Error
Hibernate: query optimization