Bugs item #1463974, was opened at 2006-04-04 08:20
Message generated for change (Comment added) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1463974&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: General
Group: SQLObject release (specify)
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Patrick Coleman (ptrck)
Assigned to: Nobody/Anonymous (nobody)
Summary: Column name collides with internal method
Initial Comment:
Hi,
My database has a column 'expire' in a certain table.
It appears that when SQLObject calls expire() (line
778, dbconnection.py) on a cache object from that
table, rather than calling the expire method to expire
the object from cache it actually returns the value
from the 'expire' column, which being a Long of course
isn't callable, resulting in the attached exception.
I propose that internal methods used by SQLObject use
names that are unlikely to collide with column names
(perhaps by prepending __SQLObject__ or similar), and
that these internal names be documented so database
designers can avoid using names that may collide.
SQLObject is SQLObject-0.7.0-py2.4, as shipped with
Turbogears 0.8a3-py2.4.
Thanks,
Patrick
--
http://www.labyrinthdata.net.au
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2006-09-07 19:43
Message:
Logged In: YES
user_id=4799
But .expire is not an internal method - it is perfectly
valid public method. Now think you read or write
inst.__SQLObject__expire() in some code instead of
inst.expire()!
The workaround would be to made the column's name and db
anme different:
local_expire = DateTimeCol(dbName="expire")
Now you can access inst.local_expire (or whatever you name
it) and call inst.expire().
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1463974&group_id=74338
|