diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java index f0e27d1725..1c9036fc97 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java @@ -228,6 +228,7 @@ public abstract class Dialect implements ConversionContext { registerHibernateType( Types.TIME, StandardBasicTypes.TIME.getName() ); registerHibernateType( Types.TIMESTAMP, StandardBasicTypes.TIMESTAMP.getName() ); registerHibernateType( Types.VARCHAR, StandardBasicTypes.STRING.getName() ); + registerHibernateType( Types.NVARCHAR, StandardBasicTypes.NSTRING.getName() ); registerHibernateType( Types.VARBINARY, StandardBasicTypes.BINARY.getName() ); registerHibernateType( Types.LONGVARCHAR, StandardBasicTypes.TEXT.getName() ); registerHibernateType( Types.LONGVARBINARY, StandardBasicTypes.IMAGE.getName() ); diff --git a/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypes.java b/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypes.java index 5a798efbf6..bb6a30676b 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypes.java +++ b/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypes.java @@ -127,6 +127,11 @@ public final class StandardBasicTypes { */ public static final StringType STRING = StringType.INSTANCE; + /** + * The standard Hibernate type for mapping {@link String} to JDBC {@link java.sql.Types#NVARCHAR NVARCHAR} + */ + public static final StringNVarcharType NSTRING = StringNVarcharType.INSTANCE; + /** * The standard Hibernate type for mapping {@link java.net.URL} to JDBC {@link java.sql.Types#VARCHAR VARCHAR}. * diff --git a/hibernate-core/src/test/java/org/hibernate/test/scalar/NationalizedScalarQueryTest.java b/hibernate-core/src/test/java/org/hibernate/test/scalar/NationalizedScalarQueryTest.java index 54a8351baa..1dc4388bfd 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/scalar/NationalizedScalarQueryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/scalar/NationalizedScalarQueryTest.java @@ -16,7 +16,6 @@ import org.hibernate.Session; import org.hibernate.annotations.Nationalized; import org.hibernate.dialect.SQLServer2008Dialect; -import org.hibernate.testing.FailureExpected; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; @@ -37,7 +36,6 @@ public class NationalizedScalarQueryTest extends BaseCoreFunctionalTestCase { } @Test - @FailureExpected(jiraKey = "HHH-10183") public void testScalarResult() { User user1 = new User( 1, "Chris" );