HHH-5342 Testes fail on mysql
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19775 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
e6862c0be0
commit
7951998639
|
@ -34,7 +34,7 @@ import org.hibernate.test.annotations.TestCase;
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public class ExplicitSqlResultSetMappingTest extends TestCase {
|
public class ExplicitSqlResultSetMappingTest extends TestCase {
|
||||||
private String queryString = "select t.\"NAME\" as \"QuotEd_nAMe\" from \"MY_ENTITY_TABLE\" t";
|
private String queryString = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Class<?>[] getAnnotatedClasses() {
|
protected Class<?>[] getAnnotatedClasses() {
|
||||||
|
@ -47,6 +47,9 @@ public class ExplicitSqlResultSetMappingTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prepareTestData() {
|
private void prepareTestData() {
|
||||||
|
char open = getDialect().openQuote();
|
||||||
|
char close = getDialect().closeQuote();
|
||||||
|
queryString="select t."+open+"NAME"+close+" as "+open+"QuotEd_nAMe"+close+" from "+open+"MY_ENTITY_TABLE"+close+" t";
|
||||||
Session s = sfi().openSession();
|
Session s = sfi().openSession();
|
||||||
s.beginTransaction();
|
s.beginTransaction();
|
||||||
s.save( new MyEntity( "mine" ) );
|
s.save( new MyEntity( "mine" ) );
|
||||||
|
|
|
@ -200,9 +200,9 @@ public class ComponentTest extends FunctionalTestCase {
|
||||||
.add( Property.forName("person.yob").between( new Integer(1999), new Integer(2002) ) )
|
.add( Property.forName("person.yob").between( new Integer(1999), new Integer(2002) ) )
|
||||||
.list();
|
.list();
|
||||||
if ( getDialect().supportsRowValueConstructorSyntax() ) {
|
if ( getDialect().supportsRowValueConstructorSyntax() ) {
|
||||||
s.createQuery("from User u where u.person = ('gavin', :dob, 'Peachtree Rd', 'Karbarook Ave', 1974, 'Peachtree Rd')")
|
s.createQuery("from User u where u.person = ('gavin', :dob, 'Peachtree Rd', 'Karbarook Ave', 1974, 34, 'Peachtree Rd')")
|
||||||
.setDate("dob", new Date("March 25, 1974")).list();
|
.setDate("dob", new Date("March 25, 1974")).list();
|
||||||
s.createQuery("from User where person = ('gavin', :dob, 'Peachtree Rd', 'Karbarook Ave', 1974, 'Peachtree Rd')")
|
s.createQuery("from User where person = ('gavin', :dob, 'Peachtree Rd', 'Karbarook Ave', 1974, 34, 'Peachtree Rd')")
|
||||||
.setDate("dob", new Date("March 25, 1974")).list();
|
.setDate("dob", new Date("March 25, 1974")).list();
|
||||||
}
|
}
|
||||||
t.commit();
|
t.commit();
|
||||||
|
|
|
@ -40,6 +40,8 @@ public class MigrationTest extends UnitTestCase {
|
||||||
SchemaUpdate v2schemaUpdate = new SchemaUpdate( v2cfg );
|
SchemaUpdate v2schemaUpdate = new SchemaUpdate( v2cfg );
|
||||||
v2schemaUpdate.execute( true, true );
|
v2schemaUpdate.execute( true, true );
|
||||||
assertEquals( 0, v2schemaUpdate.getExceptions().size() );
|
assertEquals( 0, v2schemaUpdate.getExceptions().size() );
|
||||||
|
|
||||||
|
new SchemaExport( v2cfg ).drop( false, true );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class NativeSqlAndQuotedIdentifiersTest extends DatabaseSpecificFunctiona
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void prepareTest() throws Exception {
|
protected void prepareTest() throws Exception {
|
||||||
|
if(sfi()==null)return;
|
||||||
Session session = sfi().openSession();
|
Session session = sfi().openSession();
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
session.save( new Person( "me" ) );
|
session.save( new Person( "me" ) );
|
||||||
|
@ -58,6 +59,7 @@ public class NativeSqlAndQuotedIdentifiersTest extends DatabaseSpecificFunctiona
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void cleanupTest() throws Exception {
|
protected void cleanupTest() throws Exception {
|
||||||
|
if(sfi()==null)return;
|
||||||
Session session = sfi().openSession();
|
Session session = sfi().openSession();
|
||||||
session.beginTransaction();
|
session.beginTransaction();
|
||||||
session.createQuery( "delete Person" ).executeUpdate();
|
session.createQuery( "delete Person" ).executeUpdate();
|
||||||
|
|
Loading…
Reference in New Issue