// we have hints, use them
EOModel model = EOModelGroup.defaultGroup().entityNamed(spec.entityName()).model();
ERXSQLHelper sqlHelper = ERXSQLHelper.newSQLHelper(ec, model.name());
Object hint = spec.hints().valueForKey(EODatabaseContext.CustomQueryExpressionHintKey);
String sql = sqlHelper.customQueryExpressionHintAsString(hint);
sql = sqlHelper.limitExpressionForSQL(null, spec, sql, start, end);
if (rawRowsForCustomQueries) {
result = EOUtilities.rawRowsForSQL(ec, model.name(), sql, null);
}