HHH-18537 - Support Session#createNamedSelectionQuery for native-query

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
Jan Schatteman 2024-08-29 22:34:27 +02:00 committed by Steve Ebersole
parent 80b12c46e7
commit 76df41f9be
2 changed files with 1 additions and 9 deletions

View File

@ -1065,14 +1065,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
private <R> SelectionQuery<R> createNamedNativeSelectionQuery(
NamedNativeQueryMemento memento,
Class<R> expectedResultType) {
throw new UnsupportedOperationException(
String.format(
Locale.ROOT,
"Support for `@%s` + `%s` is not (yet) implemented",
NamedNativeQuery.class.getName(),
SelectionQuery.class.getName()
)
);
return memento.toQuery( this, expectedResultType );
}
private <R> SqmSelectionQuery<R> createNamedSqmSelectionQuery(

View File

@ -17,7 +17,6 @@ import org.junit.jupiter.api.Test;
@SessionFactory
@DomainModel(annotatedClasses = NamedNativeQueryWithResultMappingTest.Mapped.class)
@FailureExpected( jiraKey = "HHH-18537", reason = "Call to #createNamedSelectionQuery for native-query, which never worked." )
@Jira( "https://hibernate.atlassian.net/browse/HHH-18537" )
public class NamedNativeQueryWithResultMappingTest {
@Test void test(SessionFactoryScope scope) {