HHH-6849 Fixing assert in SQLServer2005DialectTestCase#testGetLimitString since order of column has changes. Also got rif of additional unnecessary whitespace
This commit is contained in:
parent
06952b533e
commit
6e433d5f85
|
@ -194,6 +194,6 @@ public class SQLServer2005Dialect extends SQLServerDialect {
|
|||
int selectEndIndex = sql.indexOf( FROM );
|
||||
|
||||
// Insert after the select statement the row_number() function:
|
||||
sql.insert( selectEndIndex, ", ROW_NUMBER() OVER (" + orderby + ") as __hibernate_row_nr__ " );
|
||||
sql.insert( selectEndIndex - 1, ", ROW_NUMBER() OVER (" + orderby + ") as __hibernate_row_nr__" );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,6 @@ public class SQLServer2005DialectTestCase extends BaseUnitTestCase {
|
|||
String input = "select distinct f1 as f53245 from table849752 order by f234, f67 desc";
|
||||
|
||||
Dialect sqlDialect = new SQLServer2005Dialect();
|
||||
assertEquals( "with query as (select row_number() over (order by f234, f67 desc) as __hibernate_row_nr__, f1 as f53245 from table849752 group by f1) select * from query where __hibernate_row_nr__ >= ? and __hibernate_row_nr__ < ?", sqlDialect.getLimitString(input, 10, 15).toLowerCase() );
|
||||
assertEquals( "with query as (select f1 as f53245, row_number() over (order by f234, f67 desc) as __hibernate_row_nr__ from table849752 group by f1) select * from query where __hibernate_row_nr__ >= ? and __hibernate_row_nr__ < ?", sqlDialect.getLimitString(input, 10, 15).toLowerCase() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue