java - JPA Map Query Result to Class -
i want map query result simple pojo , can't figure out how it.
for example, i've got following pojo:
public class testmapper { private long tableaid; private string tableavalue; private long tablebid; private string tablebvalue; ... }
now want simple query mapping class like:
list<testmapper> testmappers = entitymanager.createnativequery( "select * tablea a, tableb b a.id = b.id", testmapper.class ).getresultlist();
this query not make sense represents want do. keep getting exception:
exception description: missing descriptor [class testmapper] query: readallquery(referenceclass=testmapper sql="select * tablea a, tableb b a.id = b.id")
what have do, solve issue?
Comments
Post a Comment