[Modeling-users] is this a bug in modeling?
Status: Abandoned
Brought to you by:
sbigaret
From: John L. <jl...@gm...> - 2004-08-23 13:50:35
|
Hi all. I've been owing you this for a while now. The attached model, with Modeling 0.9-pre16 + sortBy/limit patch, and 0.9-pre17.1 + sortBy/limit + quoted entities patch, produces the same (bad?) behaviour. I can test it with a plain 0.9-pre17.1 if you think it's needed. The behaviour is this: when an attribute is requested on a fault that stands in for an object that is a subclass of the target of the relation, and that attribute isn't present in the base class, an exception is raised. Thus: >>> from Modeling.EditingContext import EditingContext >>> ec=EditingContext() >>> import Store >>> p=ec.fetch('Address')[0].getPerson() >>> p.isFault() True >>> p.getTag() Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: Person instance has no attribute 'getTag' >>> p.getId() 1 >>> p.isFault() False >>> p.getTag() 'foo' >>> -- John Lenton (jl...@gm...) -- Random fortune: The greatest of faults is to be conscious of none. |