|

Monday January 26, 2009
Connector/J 5.0 to 5.1 gotcha
I moved a dev environment a little while back, and one of the gotchas I hit was a minor change between MySQL Connector/J 5.0 and 5.1. The support for select x as y type syntax is not actually valid under the jdbc api, but its something I tend to use a lot in various places. In 5.1 its been disabled by default. Anyway the work around is quite easy, although as I was moving envs (revved netbeans, mysql, OpenSolaris, connector j, glassfish, jmaki and a bunch of other things at the same time, call it optimism) I checked god knows how many other things first. Just add
useOldAliasMetadataBehavior=true
to your jdbc connection string and select as to your hearts content.
(2009-01-26 07:53:54.0)
Permalink
|