HHH-8400 - Positional parameters defined on NamedStoredProcedureQuery not applied

This commit is contained in:
Steve Ebersole 2013-08-01 01:19:33 -05:00
parent 1a3a2a52a2
commit c1d1695606
5 changed files with 11 additions and 18 deletions

View File

@ -29,11 +29,13 @@ dependencies {
// for test runtime
transitive = true
}
// for testing stored procedure support
testCompile( libraries.derby )
testRuntime( 'jaxen:jaxen:1.1' )
testRuntime( libraries.javassist )
testRuntime( libraries.unified_el )
testRuntime( libraries.derby ) // for testing stored procedure support
}
def pomName() {

View File

@ -24,7 +24,7 @@ dependencies {
// testRuntime( "org.glassfish.web:el-impl:2.1.2-b04" )
// for testing stored procedure support
testRuntime( libraries.derby )
testCompile( libraries.derby )
}
def pomName() {

View File

@ -52,13 +52,13 @@ public abstract class AbstractStoredProcedureTest extends BaseEntityManagerFunct
list = m2.getParameterDeclarations();
memento = list.get( 0 );
assertEquals( Integer.valueOf( 0 ), memento.getPosition() );
assertEquals( Integer.valueOf( 1 ), memento.getPosition() );
assertEquals( javax.persistence.ParameterMode.INOUT, memento.getMode() );
assertEquals( StringType.INSTANCE, memento.getHibernateType() );
assertEquals( String.class, memento.getType() );
memento = list.get( 1 );
assertEquals( Integer.valueOf( 1 ), memento.getPosition() );
assertEquals( Integer.valueOf( 2 ), memento.getPosition() );
assertEquals( javax.persistence.ParameterMode.INOUT, memento.getMode() );
assertEquals( LongType.INSTANCE, memento.getHibernateType() );
assertEquals( Long.class, memento.getType() );

View File

@ -24,7 +24,6 @@
package org.hibernate.jpa.test.procedure;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.StoredProcedureQuery;
import java.sql.Connection;
import java.sql.DriverManager;
@ -32,14 +31,11 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.h2.tools.SimpleResultSet;
import org.hibernate.dialect.DerbyTenSevenDialect;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.jpa.AvailableSettings;
@ -51,7 +47,6 @@ import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
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.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.HBM2DDL_AUTO, "create-drop" );

View File

@ -22,14 +22,9 @@
# Boston, MA 02110-1301 USA
#
#hibernate.dialect org.hibernate.dialect.H2Dialect
#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.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.dialect org.hibernate.dialect.H2Dialect
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.username sa
hibernate.connection.pool_size 5