Bugs item #1665328, was opened at 2007-02-21 18:36
Message generated for change (Comment added) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&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: Oleg Broytmann (phd)
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?
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2007-02-22 22:48
Message:
Logged In: YES
user_id=4799
Originator: NO
I cannot reproduce the bug. The program print 3 None's for me. SQLObject
0.7.3.
As for the None's... I have to think about it...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1665328&group_id=74338
|