Bug #34019 getTableName functions differently now, please add getTableLabel
Submitted: 23 Jan 2008 20:19 Modified: 25 Jan 2008 16:19
Reporter: Jason Clawson Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / J Severity:S4 (Feature request)
Version:java-6.0-nightly-20080114 OS:Any
Assigned to: Alexander Soklakov CPU Architecture:Any
Tags: getTableName getTableLabel
Triage: D5 (Feature request)

[23 Jan 2008 20:19] Jason Clawson
Description:
I class I had created stopped functioning correctly due to the fact that it requires getTableName to actually return the table alias which I believe used to return the alias (If I am not mistaken).  This is a misnomer and I agree the current functionality of returning the actual table name is the correct one.  

How to repeat:
n/a

Suggested fix:
I suggest adding a method called getTableLabel(int column) to ResultSetMetaData.  I realize this method is not in the java.sql.ResultSetMetaData interface (I think it should) but I really think it needs implementation.
[23 Jan 2008 20:24] Mark Matthews
Not that it's a method sitting there, but a workaround for *now* is to set "useOldAliasMetadataBehavior" to "true".
[23 Jan 2008 20:34] Jason Clawson
Nice.  I would actually like *both* behaviors if possible in the future :-)
[25 Jan 2008 16:19] Tonci Grgin
Hi Jason and thanks for your report. Your suggestions will be included in our plans and, probably, in next version of c/J.