openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ram <ram_ku...@yahoo.co.in>
Subject passing select column list as string
Date Mon, 15 Feb 2016 21:12:46 GMT
Hello, 
    i was trying to write a namedquery , but would like to pass the select columns as arguments
. 

@NamedQuery(name="emp.findAll", query="SELECT s.id.name,s.id.phone,s.address FROM emp where
s.id.name=:na and s.id.phone=:ph"). 

I would like to pass "s.id.name,s.id.phone,s.address " it as string instead of entity.column. 


@NamedQuery(name="emp.findAll", query="SELECT ?string FROM emp where s.id.name=:na and s.id.phone=:ph"). 

can i do this if so how can i pass this ?string

--Thanks
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message