column name capitalization in mysql

Issue #1206 resolved
Former user created an issue

from the email list thread: http://groups.google.com/group/sqlalchemy/browse_thread/thread/fa1d90f4abc2c5f2

Issue Description

On Mon, Oct 27, 2008 at 4:03 PM, Tom H wrote:

I'm experiencing the following problem with SA 0.4.7

The table has the following columns: id - int primary key DOB - varchar(25) ... extra columns not needed for report

It's a table from legacy app that I'm accessing from SA to generate reports, etc.

I'm having the table definition auto load (reflected from the database) like this:

myTable = Table('sample_table', metadata, autoload=True, include_columns='DOB')

When I later retreive data, the DOB column is not reflected. If I change 'DOB' to 'dob' for the include_columns list, the column is reflected as 'DOB' ... strange that the reflected name is capitalized, but when I specify all caps for include_columns the field is not reflected.

Any recommendations or suggestions for dealing with this issue?

Reply by Michael T

The problem is related to this bit of code.:

    if only and name.lower() not in only:
        self.logger.info("Omitting reflected column %s.%s" %
                         (table.name, name))
        return

If you would please submit a ticket we can get it fixed.

Thanks,

Michael

Comments (3)

  1. Log in to comment