Bugs item #1899460, was opened at 2008-02-22 02:04
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1899460&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: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: delColumn removes to many properties
Initial Comment:
# After deleting one column other columns are not accessible
# It seems that the unmakeProperties method removes all properties
# but should only remove the property from the delete column call
# Python 2.5.1
# SQLObject 0.10.0b2
from sqlobject import *
sqlhub.processConnection = connectionForURI('postgres://test:test@localhost/test')
class Author(SQLObject):
name = StringCol()
xyz = StringCol(default = 'Unused') # This column should be deleted
Author.createTable()
# Insert some authors
Author(name = 'Schiller')
Author(name = 'Goethe')
# Delete the unnecessary column
Author.sqlmeta.delColumn('xyz', changeSchema = True)
# ERROR: Can not access the name column
print [ author.name for author in Author.select()]
# Traceback (most recent call last):
# File "delcol-bug.py", line 19, in <module>
# print [ author.name for author in Author.select()]
# AttributeError: 'Author' object has no attribute 'name'
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1899460&group_id=74338
|