From: Austin Ziegler Date: 2004-11-25T06:45:33+09:00 Subject: Re: rails is awesome On Thu, 25 Nov 2004 06:22:59 +0900, Klaus Momberger wrote: > Austin Ziegler wrote in message news:<9e7db91104112404285b9f2477@mail.gmail.com>... > > On Wed, 24 Nov 2004 19:23:09 +0900, David Heinemeier Hansson > > wrote: > > > > Essentially, David, this is a *problem* with ActiveRecord. > > > > ActiveRecord is in the wrong here if it's being case-sensitive to > > > > the database's meta-data in the general case. > > > Active Record places a number of naming constraints of your database. > > > Just treat the forced lower-case as one such. In the databases where Id > > > is the same as ID and credit_ratings as CREDIT_RATINGS, it should then > > > be no problem to rename the fields. For cases where it is significant, > > > like the database I choose to use for all my projects, it's nice just > > > to be consistent and not have code to massage cases. > > When you select the metadata from Oracle, if you have not quoted your > > table names when creating them, they will be returned all uppercase. > > > > Thus, ActiveRecord is broken for any likely Oracle application. > when you select the metadata from Oracle (user_tab_columns), you can > convert them to lowercase inside the OracleAdapter. You just have to convert > them to lowercase consistently everywhere. Yes. That still doesn't fix that MySQL is broken as an application, and people who are using MySQL after years of experience with real databases will run into problems because of ActiveRecord's assumptions and some of the brain-dead tools out there for MySQL. > Quoting tablenames is not a bright idea, imho. It's still legal, and should be dealt with properly. > Rails may have some minor problems with Oracle, but I don't think the > case sensitivity of column names is one of them. It is one, as of right now. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca