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: | Eliminate unneeded properties in ColumnDef | ||
---|---|---|---|
Product: | db | Reporter: | josecefe <josecefe> |
Component: | SQL Editor | Assignee: | Andrei Badea <abadea> |
Status: | RESOLVED INVALID | ||
Severity: | blocker | ||
Priority: | P4 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows Vista | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
josecefe
2008-03-05 13:13:13 UTC
Well, this surprised me, but see this bug report: http://bugs.mysql.com/bug.php?id=34034 <quote> Hi Steve and thanks for your report. I believe it is a duplicate of Bug#31499 (Bug#32504 and many more). The behavior you ask for isn't actually JDBC-compliant (which is why there was a change in behavior in 5.1). If you want the old, non-compliant behavior, you should add "useOldAliasMetadataBehavior=true" as a configuration parameter in your JDBC URL. Note: The JDBC-compliant way of getting the information you're asking for, i.e. the "alias" for the column is by calling ResultSetMetaData.getColumnLabel(), not getColumnName(). The reason that getColumnName() is _not_ supposed to return the alias, is because it is supposed to be possible for a consumer of this API to generate a DML statement based on the metadata present in the ResultSet and ResultSetMetaData, and thus getColumnName() should return the _physical_ column name, not the alias. </quote> I will fix the code to do things in the compliant way, and get the column label versus the column name, when displaying results. If visualweb is using getColumnName(), then this should be changed as well. I'll open an associated bug against visualweb. Since a reasonable workaround exists (change your URL to include the property "useOldAliasMetadataBehavior=true") I am downgrading this to a P3. Logged issue 129330 for visualweb to get us to start using getColumnLabel() instead of getColumnName() Since the label is used everywhere, the name property of ColumnDef is not used now, just making the class more complex. Would have been better to just pass rsmd.getColumnLabel() to ColumnDef's constructor instead of introducing a new property. Yes, fair enough. Re-opening as a P4 Applies to code that was obsoleted by dataview, so not applicable anymore. |