Skip to content

Commit e27a041

Browse files
dreab8DavideD
authored andcommitted
[#2649] CascadeTest#testQuery throws NullPointerException
1 parent 106dc10 commit e27a041

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

hibernate-reactive-core/src/test/java/org/hibernate/reactive/CascadeTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
*/
66
package org.hibernate.reactive;
77

8+
import jakarta.persistence.Tuple;
89
import java.util.ArrayList;
910
import java.util.List;
1011
import java.util.Objects;
1112

1213
import org.hibernate.Hibernate;
1314
import org.hibernate.cfg.Configuration;
1415

15-
import org.junit.jupiter.api.Disabled;
1616
import org.junit.jupiter.api.Test;
1717

1818
import io.vertx.junit5.Timeout;
@@ -50,7 +50,6 @@ protected Configuration constructConfiguration() {
5050
}
5151

5252
@Test
53-
@Disabled("It also fails in Hibernate ORM, see https://hibernate.atlassian.net/browse/HHH-19868")
5453
public void testQuery(VertxTestContext context) {
5554
Node basik = new Node( "Child" );
5655
basik.parent = new Node( "Parent" );
@@ -66,13 +65,13 @@ public void testQuery(VertxTestContext context) {
6665
.thenCompose( s -> s.createQuery( "select distinct n from Node n left join fetch n.elements", Node.class ).getResultList() )
6766
.thenAccept( list -> assertThat( list ).hasSize( 2 ) )
6867
.thenCompose( v -> openSession() )
69-
.thenCompose( s -> s.createQuery( "select distinct n, e from Node n join n.elements e", Node.class ).getResultList() )
68+
.thenCompose( s -> s.createQuery( "select distinct n, e from Node n join n.elements e", Tuple.class ).getResultList() )
7069
.thenAccept( list -> assertThat( list ).hasSize( 3 ) )
7170
.thenCompose( v -> openSession() )
72-
.thenCompose( s -> s.createQuery( "select distinct n.id, e.id from Node n join n.elements e", Node.class ).getResultList() )
71+
.thenCompose( s -> s.createQuery( "select distinct n.id, e.id from Node n join n.elements e", Tuple.class ).getResultList() )
7372
.thenAccept( list -> assertThat( list ).hasSize( 3 ) )
7473
.thenCompose( v -> openSession() )
75-
.thenCompose( s -> s.createQuery( "select max(e.id), min(e.id), sum(e.id) from Node n join n.elements e group by n.id order by n.id", Node.class ).getResultList() )
74+
.thenCompose( s -> s.createQuery( "select max(e.id), min(e.id), sum(e.id) from Node n join n.elements e group by n.id order by n.id", Tuple.class ).getResultList() )
7675
.thenAccept( list -> assertThat( list ).hasSize( 1 ) )
7776
);
7877
}

0 commit comments

Comments
 (0)