From: klausm0762@... (Klaus Momberger) Date: 2004-11-25T06:22:59+09:00 Subject: Re: rails is awesome 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. > > -austin 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. Quoting tablenames is not a bright idea, imho. Rails may have some minor problems with Oracle, but I don't think the case sensitivity of column names is one of them. regards, -klaus