join in hibernate

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...
janavarAsked:
Who is Participating?
 
Tomas Helgi JohannssonConnect With a Mentor Commented:
    Hi!

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

Regards,
   Tomas Helgi
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.