tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OPENEJB-2112) 'Tweaks' to a (native) query are lost when running without a tx
Date Thu, 26 Mar 2015 12:46:53 GMT

     [ 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)

Mime
View raw message