Patches item #1416838, was opened at 2006-01-27 20:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1416838&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gabriel Reid (gab_reid)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix for styles.py for uppercase column names
Initial Comment:
If a database column name is in all uppercase, with
words separated by undscores (as is the case with
column names when fetched from the data dictionary in
Firebird), the conversion from database column name to
Python attribute name and back does not work correctly,
as shown below. This is due to the fact that the style
expects a lowercase column name, which will not be the
case with Firebird connections.
Example:
>>>
>>> from sqlobject import styles
>>> style = styles.DefaultStyle()
>>>
style.pythonAttrToDBColumn(style.dbColumnToPythonAttr('START_DATE'))
'startdat_e'
>>>
style.pythonAttrToDBColumn(style.dbColumnToPythonAttr('start_date'))
'start_date'
The attached patch simply converts the column name to
lowercase before performing the conversion on it in
underToMixed.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1416838&group_id=74338
|