• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JPA: Joins with unmapped tables

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

is it possible with jpql (hibernate here) to join to an unmapped table ?
i need to retrieve entities, that match some criteria with an unmapped table (ids, here). yes i know, i can use native queries, but in that case i´d have to create all the other joins myself (which is what the JPA normally does for me).

an example:

jpql query:


what i need would be something liek that:
or even something like



creating an bogus Entity for that unmapped table works, but isn´t an option (because i would load tons of data from there, which i do not need)

cu uwe
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No is the short answer. JPQL only works with ampped entities.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic