Hellow guys,
I have no Idea on how to do this in HQL
let's say in SQL I have this query :
Code:
select getClientName(entityId) from tblEntity
where in getClientName is a stored procedure.
So, how do I do that in HQL?
Can we combine HQL query and stored procedure from native sql? I dont think it's possible.
Or so, can I create stored procedure in HQL and call it in my hibernate query?
So far what I'm doing is I just create a sub query so I can get the result in HQL:
this is my code for HQL :
Code:
select (select b.entityName from tblName b where b.entityId = a.entityId) from tblEntity a
But what I wanted to do is to create a stored procedure in hql to replace the sub query I used.
Is it possible?
I would appreciate any help!