I think the best long-term solution is to log an enhancement request that would let a user define his own hibernate mappings on the fly.
It came up in this thread recently:
http://sourceforge.net/mailarchive/message.php?msg_id=28178046
I did not log the enhancement request. Rob added the dialect I cared about and solved that particular case. But the general problem can still come up. (As it did for you!) It would be convenient to have user-defined mappings to augment (optionally override???) the default hibernate mappings.
In the short term you need to figure out precisely which Hibernate dialect you are using for your SQL Server connection, and then modify it to include a mapping for NVARCHAR.
Regards,
Matt
On 14 Nov 2011, at 3:28, Conrad Beckert wrote:
> could anyone please help me with this: I have a Microsoft SQL Server 2005 database which I want to migrate. For that I want to recreate the tables using SQirreL's Create Table Script.
>
> Unfortunately I get an:
> org.hibernate Mapping Exception No dialect mapping for JDBC type -9
>
> Using an ODBC/JDBC bridge for connecting to the database doesn't help either:
>
> JDBC-ODBC bridge doesn't provide all off the necessary metadata. ... Server State S1002
>
>
> I did some research and discovered that the error occurs if there is a NVARCHAR field in the table to export. Unfortunately it is the case for almost all of the tables.
>
> Any ideas to work around this? I know, that it is a rather known error as there is an message on the list yet. But what to do?
>
> Thank you in advance for your help
> Conrad
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Squirrel-sql-develop mailing list
> Squ...@li...
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
|