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