java - Using JPA createNativeQuery with @SqlResultSetMapping without having to use an annotation on an existing Entity -
is there way define sqlresultsetmapping use in entitymanager.createnativequery() without using @sqlresultsetmapping annotation on existing @entity? reason i'd have rather complicated sql query involves connect by clause returning data shouldn't directly related specific @entity. i'm using sqlresultsetmapping map results of query non-entity pojo. doesn't make sense me need associate sqlresultsetmapping @entity may or may not have results coming back. in case, i'm putting annotation on closest entity still doesn't feel right.
Comments
Post a Comment