Minor code cleaning
This commit is contained in:
parent
b2aca3c846
commit
9d131ce69f
|
@ -547,12 +547,14 @@ public class QuerySqmImpl<R>
|
|||
throw new PersistenceException( "Unrecognized unwrap type [" + cls.getName() + "]" );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean applyNativeQueryLockMode(Object value) {
|
||||
throw new IllegalStateException(
|
||||
"Illegal attempt to set lock mode on non-native query via hint; use Query#setLockMode instead"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean applySynchronizeSpacesHint(Object value) {
|
||||
throw new IllegalStateException(
|
||||
"Illegal attempt to set synchronized spaces on non-native query via hint"
|
||||
|
|
|
@ -71,7 +71,7 @@ public class DeferredResultSetAccess extends AbstractResultSetAccess {
|
|||
// Note that limit and lock aren't set for SQM as that is applied during SQL rendering
|
||||
// But for native queries, we have to adapt the SQL string
|
||||
final Dialect dialect = executionContext.getSession().getJdbcServices().getDialect();
|
||||
String sql = jdbcSelect.getSql();
|
||||
String sql;
|
||||
limit = queryOptions.getLimit();
|
||||
if ( limit == null || limit.isEmpty() || jdbcSelect.usesLimitParameters() ) {
|
||||
sql = jdbcSelect.getSql();
|
||||
|
|
Loading…
Reference in New Issue