[Modeling-users] Re: is this a bug in modeling?
Status: Abandoned
Brought to you by:
sbigaret
From: John L. <jl...@gm...> - 2004-08-25 03:31:02
|
sorry, guys, please ignore. Next time I'll actually read the mail I've brain-flagged for homework before working on it. Again, sorry for the wasted time. I'll try to address the actual issue I was trying to answer shortly. On Mon, 23 Aug 2004 10:50:27 -0300, John Lenton <jl...@gm...> wrote: > 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. > > > -- John Lenton (jl...@gm...) -- Random fortune: bash: fortune: command not found |