Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA: Joins with unmapped tables

 
Uwe Schäfer
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No is the short answer. JPQL only works with ampped entities.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic