Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in HQL from Oracle VIEW

 
Aby Arackal peter
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Anybody please tell me How to create a HQL from Oracle View?

EMPLOYEE_VIEW

create or replace force view "ROOT"."EMPLOYEE_VIEW" ("seq_id","first_name","last_name",) as
select
employee.seq_id as "seq_id",
employee.first_name as "first_name",
employee.last_name as "last_name"
from employee employee
left join lookup_data lookup
on lookup.cat_id = employee.designation


EmployeeView.xml





EmployeeViewDto.java




I would like to map Above class to EMPLOYEE_VIEW , can I write the HQL?

I have done in following way but it is not working




Here Exception is coming...

Please tell me any solution.

Thanks,

Aby
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the ORM forum as it is not Spring related.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post any exception you are receiving. Are you trying to replace the view with a query against the tables that make up the view or are you trying to use the view in your query? If it is the latter a view would be treated the same as a Table.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic