HHH-13634 : Fix test case queries to order results
(cherry picked from commit 93a07453f0
)
This commit is contained in:
parent
04eba997e2
commit
81f42693dd
|
@ -81,7 +81,7 @@ public class QueryScrollingWithInheritanceEagerManyToOneTest extends BaseNonConf
|
||||||
try {
|
try {
|
||||||
statelessSession.beginTransaction();
|
statelessSession.beginTransaction();
|
||||||
Query<Employee> query = statelessSession.createQuery(
|
Query<Employee> query = statelessSession.createQuery(
|
||||||
"select distinct e from Employee e left join fetch e.otherEntities",
|
"select distinct e from Employee e left join fetch e.otherEntities order by e.dept",
|
||||||
Employee.class
|
Employee.class
|
||||||
);
|
);
|
||||||
if ( getDialect() instanceof DB2Dialect ) {
|
if ( getDialect() instanceof DB2Dialect ) {
|
||||||
|
@ -89,7 +89,7 @@ public class QueryScrollingWithInheritanceEagerManyToOneTest extends BaseNonConf
|
||||||
FetchingScrollableResultsImp#next() in order to check if the ResultSet is empty calls ResultSet#isBeforeFirst()
|
FetchingScrollableResultsImp#next() in order to check if the ResultSet is empty calls ResultSet#isBeforeFirst()
|
||||||
but the support for ResultSet#isBeforeFirst() is optional for ResultSets with a result
|
but the support for ResultSet#isBeforeFirst() is optional for ResultSets with a result
|
||||||
set type of TYPE_FORWARD_ONLY and db2 does not support it.
|
set type of TYPE_FORWARD_ONLY and db2 does not support it.
|
||||||
*/
|
*/
|
||||||
scrollableResults = query.scroll( ScrollMode.SCROLL_INSENSITIVE );
|
scrollableResults = query.scroll( ScrollMode.SCROLL_INSENSITIVE );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -143,7 +143,7 @@ public class QueryScrollingWithInheritanceEagerManyToOneTest extends BaseNonConf
|
||||||
try {
|
try {
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query<Employee> query = session.createQuery(
|
Query<Employee> query = session.createQuery(
|
||||||
"select distinct e from Employee e left join fetch e.otherEntities",
|
"select distinct e from Employee e left join fetch e.otherEntities order by e.dept",
|
||||||
Employee.class
|
Employee.class
|
||||||
);
|
);
|
||||||
if ( getDialect() instanceof DB2Dialect ) {
|
if ( getDialect() instanceof DB2Dialect ) {
|
||||||
|
@ -151,7 +151,7 @@ public class QueryScrollingWithInheritanceEagerManyToOneTest extends BaseNonConf
|
||||||
FetchingScrollableResultsImp#next() in order to check if the ResultSet is empty calls ResultSet#isBeforeFirst()
|
FetchingScrollableResultsImp#next() in order to check if the ResultSet is empty calls ResultSet#isBeforeFirst()
|
||||||
but the support for ResultSet#isBeforeFirst() is optional for ResultSets with a result
|
but the support for ResultSet#isBeforeFirst() is optional for ResultSets with a result
|
||||||
set type of TYPE_FORWARD_ONLY and db2 does not support it.
|
set type of TYPE_FORWARD_ONLY and db2 does not support it.
|
||||||
*/
|
*/
|
||||||
scrollableResults = query.scroll( ScrollMode.SCROLL_INSENSITIVE );
|
scrollableResults = query.scroll( ScrollMode.SCROLL_INSENSITIVE );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class QueryScrollingWithInheritanceProxyEagerManyToOneTest extends BaseNo
|
||||||
try {
|
try {
|
||||||
statelessSession.beginTransaction();
|
statelessSession.beginTransaction();
|
||||||
Query<Employee> query = statelessSession.createQuery(
|
Query<Employee> query = statelessSession.createQuery(
|
||||||
"select distinct e from Employee e left join fetch e.otherEntities",
|
"select distinct e from Employee e left join fetch e.otherEntities order by e.dept",
|
||||||
Employee.class
|
Employee.class
|
||||||
);
|
);
|
||||||
if ( getDialect() instanceof DB2Dialect ) {
|
if ( getDialect() instanceof DB2Dialect ) {
|
||||||
|
@ -89,7 +89,7 @@ public class QueryScrollingWithInheritanceProxyEagerManyToOneTest extends BaseNo
|
||||||
FetchingScrollableResultsImp#next() in order to check if the ResultSet is empty calls ResultSet#isBeforeFirst()
|
FetchingScrollableResultsImp#next() in order to check if the ResultSet is empty calls ResultSet#isBeforeFirst()
|
||||||
but the support for ResultSet#isBeforeFirst() is optional for ResultSets with a result
|
but the support for ResultSet#isBeforeFirst() is optional for ResultSets with a result
|
||||||
set type of TYPE_FORWARD_ONLY and db2 does not support it.
|
set type of TYPE_FORWARD_ONLY and db2 does not support it.
|
||||||
*/
|
*/
|
||||||
scrollableResults = query.scroll( ScrollMode.SCROLL_INSENSITIVE );
|
scrollableResults = query.scroll( ScrollMode.SCROLL_INSENSITIVE );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -145,7 +145,7 @@ public class QueryScrollingWithInheritanceProxyEagerManyToOneTest extends BaseNo
|
||||||
try {
|
try {
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
Query<Employee> query = session.createQuery(
|
Query<Employee> query = session.createQuery(
|
||||||
"select distinct e from Employee e left join fetch e.otherEntities",
|
"select distinct e from Employee e left join fetch e.otherEntities order by e.dept",
|
||||||
Employee.class
|
Employee.class
|
||||||
);
|
);
|
||||||
if ( getDialect() instanceof DB2Dialect ) {
|
if ( getDialect() instanceof DB2Dialect ) {
|
||||||
|
@ -153,7 +153,7 @@ public class QueryScrollingWithInheritanceProxyEagerManyToOneTest extends BaseNo
|
||||||
FetchingScrollableResultsImp#next() in order to check if the ResultSet is empty calls ResultSet#isBeforeFirst()
|
FetchingScrollableResultsImp#next() in order to check if the ResultSet is empty calls ResultSet#isBeforeFirst()
|
||||||
but the support for ResultSet#isBeforeFirst() is optional for ResultSets with a result
|
but the support for ResultSet#isBeforeFirst() is optional for ResultSets with a result
|
||||||
set type of TYPE_FORWARD_ONLY and db2 does not support it.
|
set type of TYPE_FORWARD_ONLY and db2 does not support it.
|
||||||
*/
|
*/
|
||||||
scrollableResults = query.scroll( ScrollMode.SCROLL_INSENSITIVE );
|
scrollableResults = query.scroll( ScrollMode.SCROLL_INSENSITIVE );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue