Re: Why are my col names lowercased?

[prev] [thread] [next] [Date index for 2004/10/13]

From: Perrin Harkins
Subject: Re: Why are my col names lowercased?
Date: 19:26 on 13 Oct 2004
On Wed, 2004-10-13 at 14:56, Sean Quinlan wrote:
> In an application I'm working on, I'm copying all the values for a
> particular objects attributes into an aggregate data structure, which
> will be used elsewhere to populate a form. Everything seemed to be
> working fine - but for some reason none of the values appeared in the
> form. Eventually I dumped the data structure, and discovered lower cased
> keys for the column names which had the expected values.

This is caused by the NAME_lc default parameter -- see the "connection"
section of the POD.  You can change it, although you will currently have
to change a line in sth_to_objects() as well where it gets used.

> My only guess is that for some reason someone thought it was desirable
> to have capitalization typos in accessing data be ignored, or something
> equivalent?

I'm guessing it was to normalize column names because they can come back
with the capitalization used in the query in some databases which are
not case-sensitive.

> Now I have hundreds
> of lines of code using data structures, forms, etc that use the column
> names as defined.
> 
> I really don't want to have to hand code the column names inside the
> app.

Hmm, you don't want to hand-code the column names but you already have
hundreds of lines of code that use them?  You lost me there.

Anyway, I'm sure you can find something that will make this work for
you.  You haven't actually explained how you are accessing the names. 
Can you show some code, or else just try changing the NAME_lc stuff and
see if it fixes it for you?

- Perrin

Why are my col names lowercased?
Sean Quinlan 18:56 on 13 Oct 2004

Re: Why are my col names lowercased?
Perrin Harkins 19:26 on 13 Oct 2004

Re: Why are my col names lowercased?
Sean Quinlan 21:08 on 13 Oct 2004

Re: Why are my col names lowercased?
Perrin Harkins 21:15 on 13 Oct 2004

Re: Why are my col names lowercased?
Daniel Wijnands 19:29 on 13 Oct 2004

Re: Why are my col names lowercased?
Sean Quinlan 21:07 on 13 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52