[Logo] smithproject.org
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
Aliases Not Supported In Queries!  XML
Forum Index -> Database Access
Author Message
rf



Joined: 16/02/2007 20:10:11
Messages: 4
Offline

Found an interesting bug that I'm surprised has not been mentioned. When I run a query, and use aliases for column names, the aliased column names are not returned. Only the ACTUAL column name is returned.

Has anyone found a fix for this?

- I should also add that I'm running MySQL 5.0 and have not test this with another database.
Phixion^



Joined: 05/02/2007 15:27:49
Messages: 12
Offline

Hi,
Maybe you can define these aliases in the Application.cfm and from there use it as your new alias name? Its just a small idea but i hope it helps.
rf



Joined: 16/02/2007 20:10:11
Messages: 4
Offline

I found the cause of the problem. Looks like the version 5.0.2 of the driver has some problems with Smith. I upgraded to the 5.0.4 driver and the problem has been corrected.

JAT



Joined: 06/11/2007 23:28:10
Messages: 18
Offline

rf, can you give more information? Was it the MySQL JDBC driver that you had to upgrade?

I'm currently using version 5.1.5 of the MySQL JDBC driver and having the same problem.
[WWW]
tomdonovan



Joined: 11/06/2007 20:20:23
Messages: 38
Offline

I think the problem you are seeing is MySQL bug 31499.

A note was added to the Connector/J "Upgrading" page about this.

You can work around the problem by appending:
?useOldAliasMetadataBehavior=true 
to the JDBC URL for your MySQL data source. See Connector/J Configuration Properties (search for useOldAliasMetadataBehavior near the bottom of the page).

Strictly speaking, MySQL is correct about JDBC and Smith is wrong here. The column "name" is supposed to be the physical column name, and the column "label" is for the query result.

I entered a proposed patch for this problem.

-tom-
JAT



Joined: 06/11/2007 23:28:10
Messages: 18
Offline

Woot! Thank you so much!
[WWW]
 
Forum Index -> Database Access
Go to:   
Powered by JForum 2.1.6 © JForum Team