Andreas Asplund (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNzYxMWYyN2Fl...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15497?atlOrigin=eyJpIjoiNzYxMW...
) HHH-15497 (
https://hibernate.atlassian.net/browse/HHH-15497?atlOrigin=eyJpIjoiNzYxMW...
) Count query when counting polymorphic subclasses by type fails when run twice (
https://hibernate.atlassian.net/browse/HHH-15497?atlOrigin=eyJpIjoiNzYxMW...
)
Issue Type: Bug Affects Versions: 6.1.2, 6.1.3 Assignee: Unassigned Created: 10/Sep/2022
13:16 PM Priority: Major Reporter: Andreas Asplund (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Added the following test in the file
org.hibernate.orm.test.inheritance.discriminator.SingleTableInheritancePersistTest
@Test
public void testFetchChildrenCountTwiceFails(SessionFactoryScope scope) {
scope.inTransaction(
session -> {
QueryImplementor<Long> query = session.createQuery("SELECT count(p) FROM
Person p WHERE TYPE(p) = ?1", Long.class);
query.setParameter(1, Child.class);
Long personCount = query.getSingleResult();
assertThat( personCount, is( 2L ) );
query = session.createQuery("SELECT count(p) FROM Person p WHERE TYPE(p) =
?1", Long.class);
query.setParameter(1, Child.class);
personCount = query.getSingleResult();
assertThat( personCount, is( 2L ) );
} );
}
(
https://hibernate.atlassian.net/browse/HHH-15497#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15497#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100206- sha1:d8a7a40 )