[ 
https://issues.apache.org/jira/browse/OPENEJB-2112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14381707#comment-14381707
 ] 

gui commented on OPENEJB-2112:
------------------------------

TOMEE-798 causes this issue

> 'Tweaks' to a (native) query are lost when running without a tx
> ---------------------------------------------------------------
>
>                 Key: OPENEJB-2112
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-2112
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: ejb31
>    Affects Versions: 4.7.1
>            Reporter: gui
>
> I'm trying to upgrade from 4.5.1
> In our code, we create a nativeQuery and add some hibernate specific stuff:
> {code}
>             Query query = entityManager.createNativeQuery(queryString);
>             SQLQuery hibernateQuery = query.unwrap(SQLQuery.class);
>             hibernateQuery.addScalar("device_pk", new LongType());
>             query.getResultList()
> {code}
> However , 4.7.1 fails on this code. Since there is no tx active (on purpose) 
> the JtaQuery wrapper insists on creating a new Query object during 
> getResltLIst, loosing the customization. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to