You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2015/03/26 13:46:53 UTC

[jira] [Updated] (OPENEJB-2112) 'Tweaks' to a (native) query are lost when running without a tx

     [ https://issues.apache.org/jira/browse/OPENEJB-2112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau updated OPENEJB-2112:
----------------------------------------
    Fix Version/s: 4.7.2

> '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
>            Assignee: Romain Manni-Bucau
>             Fix For: 4.7.2, 5.0.0-Milestone-1
>
>
> 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)