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.
Summary: | Wrong mapping from NVARCHAR to VARCHAR | ||
---|---|---|---|
Product: | db | Reporter: | cstadler |
Component: | Code | Assignee: | matthias42 |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PATCH_AVAILABLE |
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
patch for database metadata model v1
patch for dbschema v1 patch for j2ee.persistence v1 |
Description
cstadler
2014-07-03 05:43:31 UTC
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. |