diff --git a/testsuite/src/test/java/org/hibernate/test/jpa/ql/NativeQueryTest.java b/testsuite/src/test/java/org/hibernate/test/jpa/ql/NativeQueryTest.java index 9c5b0fa456..e548dae2a9 100644 --- a/testsuite/src/test/java/org/hibernate/test/jpa/ql/NativeQueryTest.java +++ b/testsuite/src/test/java/org/hibernate/test/jpa/ql/NativeQueryTest.java @@ -23,7 +23,7 @@ public class NativeQueryTest extends AbstractJPATest { public void testJpaStylePositionalParametersInNativeSql() { Session s = openSession(); s.beginTransaction(); - s.createSQLQuery( "select NAME from EJB3_ITEM where ITEM_ID = ?1" ).setParameter( "1", "123" ).list(); + s.createSQLQuery( "select NAME from EJB3_ITEM where ITEM_ID = ?1" ).setParameter( "1", new Long( 123 ) ).list(); s.getTransaction().commit(); s.close(); } diff --git a/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java b/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java index 355977830d..6e12fcf7eb 100644 --- a/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java +++ b/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java @@ -56,6 +56,7 @@ import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.PointbaseDialect; import org.hibernate.dialect.PostgreSQLDialect; import org.hibernate.dialect.SAPDBDialect; +import org.hibernate.dialect.SQLServerDialect; import org.hibernate.dialect.SybaseDialect; import org.hibernate.dialect.TimesTenDialect; import org.hibernate.engine.SessionFactoryImplementor; @@ -2135,7 +2136,7 @@ public class FooBarTest extends LegacyTestCase { s.find("select count(*) from Baz as baz where 1 in indices(baz.fooArray)"); s.find("select count(*) from Bar as bar where 'abc' in elements(bar.baz.fooArray)"); s.find("select count(*) from Bar as bar where 1 in indices(bar.baz.fooArray)"); - if ( !(getDialect() instanceof DB2Dialect) && !(getDialect() instanceof Oracle9Dialect) && !(getDialect() instanceof Oracle8iDialect ) ) { + if ( !(getDialect() instanceof DB2Dialect) && !(getDialect() instanceof Oracle9Dialect) && !(getDialect() instanceof Oracle8iDialect ) && !( getDialect() instanceof SybaseDialect && !(getDialect() instanceof SQLServerDialect ) ) ) { s.find("select count(*) from Bar as bar, bar.component.glarch.proxyArray as g where g.id in indices(bar.baz.fooArray)"); s.find("select max( elements(bar.baz.fooArray) ) from Bar as bar, bar.component.glarch.proxyArray as g where g.id in indices(bar.baz.fooArray)"); }