[jboss-jira] [JBoss JIRA] (AS7-2899) entities returned from Queries that are created from transaction scoped entity manager used without jta, should be detached.
Scott Marlow (Created) (JIRA)
jira-events at lists.jboss.org
Fri Dec 2 10:49:41 EST 2011
entities returned from Queries that are created from transaction scoped entity manager used without jta, should be detached.
----------------------------------------------------------------------------------------------------------------------------
Key: AS7-2899
URL: https://issues.jboss.org/browse/AS7-2899
Project: Application Server 7
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 7.1.0.Beta1
Reporter: Scott Marlow
Assignee: Scott Marlow
JPA 2.0 section 3.8.6 Query Execution:
"
Query and TypedQuery methods other than the executeUpdate method are not required to be invoked within a transaction context, unless a lock mode other than LockModeType.NONE has been specified for the query. In particular, the getResultList and getSingleResult methods are not required to be invoked within a transaction context unless such a lock mode has been specified for the query.[47] If an entity manager with transaction-scoped persistence context is in use, the resulting entities will be detached; if an entity manager with an extended persistence context is used, they will be managed. See Chapter 7 for further discussion of entity manager use outside a transaction and persistence context types.
"
AS7-2781 has a test case that demonstrates that this doesn't happen (the Query is currently commented out).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list