HHH-10766 : Correct test to use Session.createSQLQuery (session.createNativeQuery API is 5.2+)
(cherry picked from commit bec1ff8f83
)
This commit is contained in:
parent
3ad5780256
commit
c57c564fa5
|
@ -35,10 +35,10 @@ public class EnumExplicitTypeTest extends BaseCoreFunctionalTestCase {
|
|||
s.clear();
|
||||
|
||||
s.getTransaction().begin();
|
||||
Number id = (Number) session.createNativeQuery(
|
||||
Number id = (Number) session.createSQLQuery(
|
||||
"select id from Person where originalHairColor = :color" )
|
||||
.setParameter( "color", HairColor.BLONDE.name() )
|
||||
.getSingleResult();
|
||||
.uniqueResult();
|
||||
assertEquals( 1L, id.longValue() );
|
||||
s.getTransaction().commit();
|
||||
s.close();
|
||||
|
|
Loading…
Reference in New Issue