I
I
Igor Mamushin2016-10-13 13:36:20
Oracle
Igor Mamushin, 2016-10-13 13:36:20

How to make NHibernate and nvarchar2 friends?

I need to write/update a unicode string to an nvarchar2 field using NHibernate, but NHibernate doesn't add an N prefix to this field, which causes the string to not be considered unicode.
Has anyone encountered a similar problem and how to solve it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
offan, 2016-10-15
@offan

How to fix mapping errors in Hibernate(no dialect mapping for JDBC type: -9, Found: nclob, expected: nvarchar2
)
MappingException: No Dialect mapping for JDBC type: -9
or
Wrong column type in MIG.LOG for column msg.
Found : nclob, expected: nvarchar2
(
255 char
) getName());
registerColumnType( Types.VARCHAR, "nvarchar($1)" );
registerColumnType( Types.CLOB, "nclob" );
registerColumnType( Types.NCLOB, "nclob" );
}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question