Scott Marlow commented on Bug HHH-7928

I reverted back to commit id e2bdf24e33cc6e70d91177e65e49bca973b125c7 and ran the tck test again (passes as expected). The SQL output from the test portion (same part of code as the previous comment showing result set is from):

10:10:01,111 DEBUG [org.jboss.as.jpa] (EJB default - 1) EJB default - 1:[transaction scoped EntityManager]: created entity manager session TransactionImple < ac, BasicAction: 0:ffff7f000001:-39a6ca5e:50f81201:24 status: ActionStatus.RUNNING >
10:10:01,394 TRACE [org.jboss.as.jpa] (EJB default - 1) createQuery took 283ms
10:10:01,401 DEBUG [org.hibernate.SQL] (EJB default - 1) select customer0_.ID as ID19_, customer0_.code as code19_, customer0_.country as country19_, customer0_.FK6_FOR_CUSTOMER_TABLE as FK5_19_, customer0_.NAME as NAME19_, customer0_.FK5_FOR_CUSTOMER_TABLE as FK6_19_ from CUSTOMER_TABLE customer0_ inner join FKS_ALIAS_CUSTOMER aliases1_ on customer0_.ID=aliases1_.FK_FOR_CUSTOMER_TABLE inner join ALIAS_TABLE alias2_ on aliases1_.FK_FOR_ALIAS_TABLE=alias2_.ID where alias2_.ALIAS=? fetch first 20 rows only
10:10:01,401 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (EJB default - 1) binding parameter [1] as [VARCHAR] - fish

10:10:01,402 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [1] as column [ID19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [USA] as column [code19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [United States] as column [country19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [1] as column [FK5_19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [Alan E. Frechette] as column [NAME19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [2] as column [FK6_19_]

10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [2] as column [ID19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [USA] as column [code19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [United States] as column [country19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [3] as column [FK5_19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [Arthur D. Frechette] as column [NAME19_]
10:10:01,403 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (EJB default - 1) Found [4] as column [FK6_19_]

10:10:01,404 TRACE [org.hibernate.type.CollectionType] (EJB default - 1) Created collection wrapper: com.sun.ts.tests.ejb30.persistence.criteriaapi.util.Customer.aliases#1
10:10:01,404 TRACE [org.hibernate.type.CollectionType] (EJB default - 1) Created collection wrapper: com.sun.ts.tests.ejb30.persistence.criteriaapi.util.Customer.aliasesNoop#1
10:10:01,404 TRACE [org.hibernate.type.CollectionType] (EJB default - 1) Created collection wrapper: com.sun.ts.tests.ejb30.persistence.criteriaapi.util.Customer.creditCards#1
10:10:01,408 DEBUG [org.hibernate.SQL] (EJB default - 1) select address0_.ID as ID4_0_, address0_.CITY as CITY4_0_, address0_.STATE as STATE4_0_, address0_.STREET as STREET4_0_, address0_.ZIP as ZIP4_0_ from ADDRESS address0_ where address0_.ID=?

Why are we seeing an unexpected result set entry for the previous comment (failing case) that we don't see when HHH-6361 is not used. What are the possible reasons? Note that the first line of TRACE logging shows that a new EntityManager/Session will be used (as per the "created entity manager").

Clearly, this problem has more to do with the previous activity when we are doing the createRelationships() setup (which is also when the HHH-6361 introduced code is invoked).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira