Hi,
I am new to hibernate.
Right now I am doing a simple project on hibernate. I have a simple question
I have two tables for example: TableA and TableB.
TableA has TableId and TableAName.
TableB has TableId, UserId and TableBScore.
Both TableIds are primary keys. Now I would like to retrieve TableAName, TableBScore based on UserId from TableB. I have a basic idea that how to write in SQL.
Select A.TableAName, B.TableBScore from TableA A,TableB B where A.TableId=B.TableB and B.UserId=1;
I was trying to do this using HQL I couldn't understand how to do this scenario. Can anyone help me in this?
Thanks for your help in advance.
I am new to hibernate.
Right now I am doing a simple project on hibernate. I have a simple question
I have two tables for example: TableA and TableB.
TableA has TableId and TableAName.
TableB has TableId, UserId and TableBScore.
Both TableIds are primary keys. Now I would like to retrieve TableAName, TableBScore based on UserId from TableB. I have a basic idea that how to write in SQL.
Select A.TableAName, B.TableBScore from TableA A,TableB B where A.TableId=B.TableB and B.UserId=1;
I was trying to do this using HQL I couldn't understand how to do this scenario. Can anyone help me in this?
Thanks for your help in advance.