Using idName with fromDatabase; id col issues
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
See this post:
http://thread.gmane.org/gmane.comp.python.sqlobject/9360
When using fromDatabase = True with idName:
class SystemsInfo(SQLObject):
class sqlmeta:
fromDatabase = True
table = 'SystemsInfo'
idType = str
idName = 'SystemName'
lazyUpdate = True
.. an attempt to insert a new row with all other columns but the index (SystemName) defined results in a duplicate column error:
item = SystemsInfo(id='uniquename')
SystemName is used both as the id column and is in place in the normal column listing.
Fixed in the revisions 3881:3888.