开发者

JPA- Map the resultset from a stored procedure call to an entity class

开发者 https://www.devze.com 2023-03-02 14:54 出处:网络
I am using eclipselink, and I have the following code to call a stored procedure: Query q = em.createNativeQuery(\"exec ....\");

I am using eclipselink, and I have the following code to call a stored procedure:

Query q = em.createNativeQuery("exec ....");

List list = q.getResultList();

I开发者_Python百科s it possible to map this list to a customized entity class that I created?


TypeQuery q= em.createNativeQuery("exec....",YOURENTITY.class); List list=q.getResultList();

0

精彩评论

暂无评论...
验证码 换一张
取 消