Skip to content

Commit 0b735f1

Browse files
committed
fix
1 parent ce271ee commit 0b735f1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/query/sql/internal/ReactiveNativeQueryImpl.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.hibernate.query.spi.QueryInterpretationCache;
4040
import org.hibernate.query.sql.internal.NativeQueryImpl;
4141
import org.hibernate.query.sql.spi.NamedNativeQueryMemento;
42+
import org.hibernate.query.sql.spi.NativeSelectQueryPlan;
4243
import org.hibernate.reactive.logging.impl.Log;
4344
import org.hibernate.reactive.logging.impl.LoggerFactory;
4445
import org.hibernate.reactive.query.spi.ReactiveAbstractSelectionQuery;
@@ -187,6 +188,18 @@ public List<R> list() {
187188
return selectionQueryDelegate.list();
188189
}
189190

191+
@Override
192+
public CompletionStage<Long> getReactiveResultsCount() {
193+
NativeSelectQueryPlan<Long> countQueryPlan = createCountQueryPlan();
194+
return selectionQueryDelegate
195+
.getReactiveResultsCount(null, this );
196+
}
197+
198+
@Override
199+
protected NativeSelectQueryPlan<Long> createCountQueryPlan() {
200+
return super.createCountQueryPlan();
201+
}
202+
190203
@Override
191204
public CompletionStage<List<R>> reactiveList() {
192205
return selectionQueryDelegate.reactiveList();

0 commit comments

Comments
 (0)