Patches item #1665328, was opened at 2007-02-21 12:36
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=1665328&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
Private: No
Submitted By: Leandro Lucarella (llucax)
Assigned to: Nobody/Anonymous (nobody)
Summary: childName column broken on leaf InheritableSQLObjects
Initial Comment:
from sqlobject import *
from sqlobject.inheritance import InheritableSQLObject
__connection__ = 'sqlite:///:memory:'
class Base(InheritableSQLObject):
base = IntCol()
Base.createTable()
class Derived(Base):
derived = IntCol()
Derived.createTable()
class Derived2(Derived):
_inheritable = False
derived2 = IntCol()
Derived2.createTable()
Base(base=1)
Derived(base=2, derived=2)
Derived2(base=3, derived=3, derived2=3)
print Base.get(1).childName
# ok (None)
print Base.get(2).childName
# ok (None)
print Base.get(3).childName
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 1, in <lambda>
File "sqlobject/main.py", line 987, in _SO_loadValue
result = getattr(self, attrName)
AttributeError: 'Derived2' object has no attribute '_SO_val_childName'
Besides the bug, what's the idea of having a 'childName' attribute if it always return None?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1665328&group_id=74338
|