This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
in class org.netbeans.modules.db.metadata.model.jdbc.JDBCUtils.getSQLType(...) there is a mapping from Unicode-suuporting types to non-Unicode supporting types: case TypesJDBC4.LONGNVARCHAR: return SQLType.LONGVARCHAR; case TypesJDBC4.NCHAR: return SQLType.CHAR; case TypesJDBC4.NCLOB: return SQLType.CLOB; case TypesJDBC4.NVARCHAR: return SQLType.VARCHAR; It seems to be wrong, because it should be so: case TypesJDBC4.LONGNVARCHAR: return SQLType.LONGNVARCHAR; case TypesJDBC4.NCHAR: return SQLType.NCHAR; case TypesJDBC4.NCLOB: return SQLType.NCLOB; case TypesJDBC4.NVARCHAR: return SQLType.NVARCHAR;
This is an issue for me, too. This mapping must be from pre JDBC4 times. Since it's really simple to fix this is an easy win.
Created attachment 148658 [details] patch for database metadata model v1 I'll attach two more patches - this is a revised version of tan older (2009) patch: http://hg.netbeans.org/main-golden/rev/5e8071a09f05 With the references JDBC types now part of the JDK, the extra definitions can be dropped. This is not tested - the changes look simple, they compile. As netbeans still fails to compile with a jdk8 javac and/or against JDK8, I won't put time into running unittests, that flood my console with warnings and errors...
Created attachment 148659 [details] patch for dbschema v1
Created attachment 148660 [details] patch for j2ee.persistence v1
Ok - I applied the changes to core-main: http://hg.netbeans.org/core-main/rev/7ef5e068a091 To be frank: They are the cleanup I promised, but the change is untested, as I did not manage to find a database that reports it columns as SQLType NVARCHAR/NCHAR/NCLOB/... I tested: - derby (no matching jdbc type) - sqlite (fails to retrieve necessary metadata) - mysql (convert tables created with nchar/nvarchar to the non "N"-Type - Informix (creates column with the datatype, reports them as basic column type without N) - oracle (creates column with the datatype, reports them as OTHER datatype) => In the next few days a nightly build with this fix will be available and a message will be appended here. Please try that version and check whether you agree, that it is fixed. If you verify, please change the status of this bug to VERIFIED.