Hi, BranchVO is an Embeddable. The enhancement process should process @Entity, @MappedSuperClass, and @Embeddable POJOs.
You mentioned earlier that you were using WebSphere. But, the code snippet below shows you manually creating the EMF and EM. So, I would guess that for this test case, you are not running within WebSphere. And, if that's the case, then how are you enhancing your POJOs? A simple enhancement technique for testcases running outside of an app server is to use the -javaagent:<location of OpenJPA library> parameter. >From your description, it does look to be a simple case of non-enhancement. Now we just need to figure out why your POJOs are not getting enhanced, even though you think they should be. Thanks, Kevin On Wed, Sep 28, 2011 at 12:16 PM, chintan4181 <chintan4...@gmail.com> wrote: > 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. >