openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chintan4181 <chintan4...@gmail.com>
Subject map resultset to custom object
Date Thu, 15 Sep 2011 18:54:23 GMT
Hi,

I have a requirement to map resultset retrieve from Natve SQL query to
custom value object instead of entity,how can i do that? 

One option to define JPQL and map your object to entity. 
Example: SELECT NEW
com.pmigroup.origination.miapplication.vo.BranchVO(b.Branch_ID," +
		"b.Branch_Cust_ID) FROM Branch AS b
But let's say i don't have Brnach as an Entity then how can i map result set
to BranchVO?

Can someone help me out?

Thanks
Chintan

--
View this message in context: http://openjpa.208410.n2.nabble.com/map-resultset-to-custom-object-tp6798108p6798108.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message