HHH-8400 - Positional parameters defined on NamedStoredProcedureQuery not applied
This commit is contained in:
parent
1a3a2a52a2
commit
c1d1695606
|
@ -29,11 +29,13 @@ dependencies {
|
||||||
// for test runtime
|
// for test runtime
|
||||||
transitive = true
|
transitive = true
|
||||||
}
|
}
|
||||||
|
// for testing stored procedure support
|
||||||
|
testCompile( libraries.derby )
|
||||||
|
|
||||||
|
|
||||||
testRuntime( 'jaxen:jaxen:1.1' )
|
testRuntime( 'jaxen:jaxen:1.1' )
|
||||||
testRuntime( libraries.javassist )
|
testRuntime( libraries.javassist )
|
||||||
testRuntime( libraries.unified_el )
|
testRuntime( libraries.unified_el )
|
||||||
testRuntime( libraries.derby ) // for testing stored procedure support
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def pomName() {
|
def pomName() {
|
||||||
|
|
|
@ -24,7 +24,7 @@ dependencies {
|
||||||
// testRuntime( "org.glassfish.web:el-impl:2.1.2-b04" )
|
// testRuntime( "org.glassfish.web:el-impl:2.1.2-b04" )
|
||||||
|
|
||||||
// for testing stored procedure support
|
// for testing stored procedure support
|
||||||
testRuntime( libraries.derby )
|
testCompile( libraries.derby )
|
||||||
}
|
}
|
||||||
|
|
||||||
def pomName() {
|
def pomName() {
|
||||||
|
|
|
@ -52,13 +52,13 @@ public abstract class AbstractStoredProcedureTest extends BaseEntityManagerFunct
|
||||||
list = m2.getParameterDeclarations();
|
list = m2.getParameterDeclarations();
|
||||||
|
|
||||||
memento = list.get( 0 );
|
memento = list.get( 0 );
|
||||||
assertEquals( Integer.valueOf( 0 ), memento.getPosition() );
|
assertEquals( Integer.valueOf( 1 ), memento.getPosition() );
|
||||||
assertEquals( javax.persistence.ParameterMode.INOUT, memento.getMode() );
|
assertEquals( javax.persistence.ParameterMode.INOUT, memento.getMode() );
|
||||||
assertEquals( StringType.INSTANCE, memento.getHibernateType() );
|
assertEquals( StringType.INSTANCE, memento.getHibernateType() );
|
||||||
assertEquals( String.class, memento.getType() );
|
assertEquals( String.class, memento.getType() );
|
||||||
|
|
||||||
memento = list.get( 1 );
|
memento = list.get( 1 );
|
||||||
assertEquals( Integer.valueOf( 1 ), memento.getPosition() );
|
assertEquals( Integer.valueOf( 2 ), memento.getPosition() );
|
||||||
assertEquals( javax.persistence.ParameterMode.INOUT, memento.getMode() );
|
assertEquals( javax.persistence.ParameterMode.INOUT, memento.getMode() );
|
||||||
assertEquals( LongType.INSTANCE, memento.getHibernateType() );
|
assertEquals( LongType.INSTANCE, memento.getHibernateType() );
|
||||||
assertEquals( Long.class, memento.getType() );
|
assertEquals( Long.class, memento.getType() );
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
package org.hibernate.jpa.test.procedure;
|
package org.hibernate.jpa.test.procedure;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
import javax.persistence.EntityManagerFactory;
|
|
||||||
import javax.persistence.StoredProcedureQuery;
|
import javax.persistence.StoredProcedureQuery;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
|
@ -32,14 +31,11 @@ import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Statement;
|
import java.sql.Statement;
|
||||||
import java.sql.Types;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.h2.tools.SimpleResultSet;
|
|
||||||
|
|
||||||
import org.hibernate.dialect.DerbyTenSevenDialect;
|
import org.hibernate.dialect.DerbyTenSevenDialect;
|
||||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||||
import org.hibernate.jpa.AvailableSettings;
|
import org.hibernate.jpa.AvailableSettings;
|
||||||
|
@ -51,7 +47,6 @@ import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase;
|
||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import org.hibernate.testing.FailureExpected;
|
import org.hibernate.testing.FailureExpected;
|
||||||
|
@ -223,7 +218,8 @@ public class JpaTckUsageTest extends BaseUnitTestCase {
|
||||||
|
|
||||||
settings.put( org.hibernate.cfg.AvailableSettings.DIALECT, DerbyTenSevenDialect.class );
|
settings.put( org.hibernate.cfg.AvailableSettings.DIALECT, DerbyTenSevenDialect.class );
|
||||||
settings.put( org.hibernate.cfg.AvailableSettings.DRIVER, org.apache.derby.jdbc.EmbeddedDriver.class.getName() );
|
settings.put( org.hibernate.cfg.AvailableSettings.DRIVER, org.apache.derby.jdbc.EmbeddedDriver.class.getName() );
|
||||||
settings.put( org.hibernate.cfg.AvailableSettings.URL, "jdbc:derby:hibernate-orm-testing;create=true" );
|
// settings.put( org.hibernate.cfg.AvailableSettings.URL, "jdbc:derby:/tmp/hibernate-orm-testing;create=true" );
|
||||||
|
settings.put( org.hibernate.cfg.AvailableSettings.URL, "jdbc:derby:memory:hibernate-orm-testing;create=true" );
|
||||||
settings.put( org.hibernate.cfg.AvailableSettings.USER, "" );
|
settings.put( org.hibernate.cfg.AvailableSettings.USER, "" );
|
||||||
|
|
||||||
settings.put( org.hibernate.cfg.AvailableSettings.HBM2DDL_AUTO, "create-drop" );
|
settings.put( org.hibernate.cfg.AvailableSettings.HBM2DDL_AUTO, "create-drop" );
|
||||||
|
|
|
@ -22,14 +22,9 @@
|
||||||
# Boston, MA 02110-1301 USA
|
# Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
#hibernate.dialect org.hibernate.dialect.H2Dialect
|
hibernate.dialect org.hibernate.dialect.H2Dialect
|
||||||
#hibernate.connection.driver_class org.h2.Driver
|
hibernate.connection.driver_class org.h2.Driver
|
||||||
#hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE;LOCK_TIMEOUT=10000
|
hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE;LOCK_TIMEOUT=10000
|
||||||
#hibernate.connection.username sa
|
|
||||||
|
|
||||||
hibernate.dialect org.hibernate.dialect.DerbyTenSevenDialect
|
|
||||||
hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver
|
|
||||||
hibernate.connection.url jdbc:derby:memory:hibernate-orm-testing;create=true
|
|
||||||
hibernate.connection.username sa
|
hibernate.connection.username sa
|
||||||
|
|
||||||
hibernate.connection.pool_size 5
|
hibernate.connection.pool_size 5
|
||||||
|
|
Loading…
Reference in New Issue