throw new AssertionFailure( "Unsupported named query model. Please report the bug in Hibernate EntityManager");
}
if ( queryReturns.length > 1 ) {
throw new IllegalArgumentException( "Cannot create TypedQuery for query with more than one return" );
}
final NativeSQLQueryReturn nativeSQLQueryReturn = queryReturns[0];
if ( nativeSQLQueryReturn instanceof NativeSQLQueryRootReturn ) {
final String entityClassName = ( ( NativeSQLQueryRootReturn ) nativeSQLQueryReturn ).getReturnEntityName();
try {
actualReturnedClass = ReflectHelper.classForName( entityClassName, AbstractEntityManagerImpl.class );
}