mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
HHH-10183 - Mapping for NVARCHAR in SqlServer not working with native queries; org.hibernate.MappingException: No Dialect mapping for JDBC type: -9
(cherry picked from commit 0693b542569664ee148068a24b299ae1b040ddc0)
This commit is contained in:
parent
e450e55bd9
commit
d7604aa55d
@ -202,6 +202,7 @@ protected Dialect() {
|
||||
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() );
|
||||
|
@ -142,6 +142,11 @@ public 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}.
|
||||
*
|
||||
|
@ -16,7 +16,6 @@
|
||||
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 @@ protected Class<?>[] getAnnotatedClasses() {
|
||||
}
|
||||
|
||||
@Test
|
||||
@FailureExpected(jiraKey = "HHH-10183")
|
||||
public void testScalarResult() {
|
||||
|
||||
User user1 = new User( 1, "Chris" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user