From cdfdbf4a45a87d69d404db219538338aa1ea94db Mon Sep 17 00:00:00 2001 From: Strong Liu Date: Fri, 31 May 2013 15:20:57 -0700 Subject: [PATCH] HHH-7919 : Miscellaneous bugfixes --- .../source/annotations/global/SqlResultSetProcessor.java | 2 +- .../org/hibernate/test/annotations/query/QueryAndSQLTest.java | 2 -- .../src/test/java/org/hibernate/jpa/test/query/QueryTest.java | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/annotations/global/SqlResultSetProcessor.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/annotations/global/SqlResultSetProcessor.java index edef8eaad5..3d8ccc2bf2 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/annotations/global/SqlResultSetProcessor.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/annotations/global/SqlResultSetProcessor.java @@ -163,7 +163,7 @@ public class SqlResultSetProcessor { ); for ( final FieldResult fieldResult : fieldResultList ) { - insert( StringHelper.root( fieldResult.name ), fieldResult.column, propertyResults ); + insert( fieldResult.column, StringHelper.root( fieldResult.name ), propertyResults ); } final NativeSQLQueryRootReturn result = new NativeSQLQueryRootReturn( diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java index 4f188ec848..9091e010de 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java @@ -159,7 +159,6 @@ public class QueryAndSQLTest extends BaseCoreFunctionalTestCase { } @Test - @FailureExpectedWithNewMetamodel public void testSQLQuery() { Night n = new Night(); Calendar c = new GregorianCalendar(); @@ -218,7 +217,6 @@ public class QueryAndSQLTest extends BaseCoreFunctionalTestCase { } @Test - @FailureExpectedWithNewMetamodel public void testSQLQueryWithManyToOne() { cleanupCache(); Night n = new Night(); diff --git a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/query/QueryTest.java b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/query/QueryTest.java index a3d31f7056..ff68d667f7 100644 --- a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/query/QueryTest.java +++ b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/query/QueryTest.java @@ -23,7 +23,6 @@ */ package org.hibernate.jpa.test.query; -import java.sql.Timestamp; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -43,7 +42,6 @@ import org.hibernate.jpa.test.Distributor; import org.hibernate.jpa.test.Item; import org.hibernate.jpa.test.Wallet; -import org.hibernate.testing.FailureExpectedWithNewMetamodel; import org.hibernate.testing.TestForIssue; import static org.junit.Assert.assertEquals; @@ -312,7 +310,6 @@ public class QueryTest extends BaseEntityManagerFunctionalTestCase { } @Test - @FailureExpectedWithNewMetamodel public void testNativeQueryByResultSet() { Item item = new Item( "Mouse", "Micro$oft mouse" ); @@ -603,7 +600,6 @@ public class QueryTest extends BaseEntityManagerFunctionalTestCase { } @Test - @FailureExpectedWithNewMetamodel public void testTypedNamedNativeQuery() { Item item = new Item( "Mouse", "Micro$oft mouse" );