HHH-13550 : Fix Oracle failure for test added by HHH-13424

(cherry picked from commit 6510c34e93)
This commit is contained in:
Gail Badner 2019-08-08 22:34:09 -07:00
parent 2f1774beb8
commit cc164e4dec
1 changed files with 13 additions and 14 deletions

View File

@ -49,11 +49,12 @@ public class JoinedTableNullNonOptionalSecondaryTableTest extends AbstractNonOpt
assertNotNull( anEntity ); assertNotNull( anEntity );
assertNull( anEntity.aDetail ); assertNull( anEntity.aDetail );
// assert that a row was inserted into Details when its property is null // assert that a row was inserted into Details when its property is null
final Number id = (Number) entityManager.createNativeQuery(
"select id from Details where aDetail is null"
).getSingleResult();
assertEquals( assertEquals(
1, 1,
entityManager.createNativeQuery( id.intValue()
"select id from Details where aDetail is null"
).getSingleResult()
); );
} }
); );
@ -73,18 +74,16 @@ public class JoinedTableNullNonOptionalSecondaryTableTest extends AbstractNonOpt
assertNotNull( anEntity ); assertNotNull( anEntity );
assertNull( anEntity.aDetail ); assertNull( anEntity.aDetail );
// assert that a row was inserted into Details when its property is null // assert that a row was inserted into Details when its property is null
assertEquals( Number id = (Number) entityManager.createNativeQuery(
1, "select id from Details where aDetail is null"
entityManager.createNativeQuery( ).getSingleResult();
"select id from Details where aDetail is null"
).getSingleResult() assertEquals( 1, id.intValue() );
);
// assert that a row was inserted into MoreDetails when its property is null // assert that a row was inserted into MoreDetails when its property is null
assertEquals( 1, id = (Number) entityManager.createNativeQuery(
entityManager.createNativeQuery( "select id from MoreDetails where anotherDetail is null"
"select id from MoreDetails where anotherDetail is null" ).getSingleResult();
).getSingleResult() assertEquals( 1,id.intValue() );
);
} }
); );
} }