[SQL-CVS] [ sqlobject-Bugs-1665328 ] childName column broken on leaf InheritableSQLObjects
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: SourceForge.net <no...@so...> - 2007-02-22 19:37:43
|
Bugs item #1665328, was opened at 2007-02-21 18:36 Message generated for change (Settings changed) 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? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1665328&group_id=74338 |