• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in HQL from Oracle VIEW

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the ORM forum as it is not Spring related.
 
Bill Gorder
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic