[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


join in hibernate

Posted on 2007-10-19
Medium Priority
Last Modified: 2011-09-20
hi all,

i am a newbie to hibernate and having problems about join. Image i have two tables like this

create table tbl_master (
id number,
name varchar2(50)
create table tbl_detail (
id number,
master_id number,
customer_name varchar2(50)
and my query is;
SELECT A.name, B.cusomer_name FROM tbl_master A LEFT JOIN tbl_detail ON (A.id=B.master_id)

how can i implement  above sql statment in hql?
is it sensible creating a view an fetching data via this?
could you explain me from scratch?

thanks in advance...
Question by:janavar
1 Comment
LVL 26

Accepted Solution

Tomas Helgi Johannsson earned 130 total points
ID: 20107344

Here is an Inner Join example in HQL : http://www.java2s.com/Code/Java/Hibernate/HQLFetchAssociationsHQLInnerJoin.htm

   Tomas Helgi

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month18 days, 18 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question