Hi kevin,
Attached POJO:--
http://openjpa.208410.n2.nabble.com/file/n6841060/BranchVO.java
BranchVO.java 

Code snippet to retrieve values 

//native sql query
String njSql = "SELECT b.branch_id, b.branch_cust_id,
ba.branch_address_street1 from branch as b," +
                                "branch_address as ba where b.branch_id = ?";

EntityManager em = emf.createEntityManager("pu1");
//fails at this point while retrieving entities defined in pesistent.xml
Set<EntityType<?>> em1Entitites = em.getMetamodel().getEntities();

                for (EntityType type : em1Entitites) {
                        Class javaType = type.getJavaType();
                        if 
(javaType.getName().equals(BranchVO.class.getName())) {
                                break;
                        }
                }

Gives error saying, BranchVO is not enhanced. I understood because it's not
having @Entity. But i want to populate objet using native query without
defining native query in an Entity .

Let me know if you need more information




--
View this message in context: 
http://openjpa.208410.n2.nabble.com/How-to-Enable-Buildtime-entity-enhancement-in-RSA-tp6836583p6841060.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to