jpa 2.0 - Can JPA join to a codes table when part of join clause requires a hard coded value? -


i resulting entity contain columns table1, plus description codes1.

if in sql write follows:

select table1.*, codes1.description table1 inner joing codes1 codes1.code = table1.status_code                       , codes1.group = 'status' 

i have done native query, using straight jpa if possible.

codes table:

group   code  description status      status code status  b     status code b other       other code 

if imagine 2 objects: table1 , code1. class table1 contains of course code1.

in "straight jpa" or jpql select object query be:

select t table1 t t.code1.group = 'status' 

the join automaticaly done mapping (@onetoone, @manytoone...).


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -