HHH-10766 : Correct test to use Session.createSQLQuery (session.createNativeQuery API is 5.2+)

(cherry picked from commit bec1ff8f83)
This commit is contained in:
Gail Badner 2016-05-25 15:20:10 -07:00
parent 3ad5780256
commit c57c564fa5
1 changed files with 2 additions and 2 deletions

View File

@ -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();