Re: toOne relationship returns base class instead of subcl
Sebastien Bigaret <[email protected]> 29 Jul 2004 10:30:02 +0200
| Newsgroups | gmane.comp.python.modeling |
|---|---|
| Message-ID | <[email protected]> |
Hi John,
Again, could you be a little more explicit, or exhibit a short
example? Sorry for getting back on this, but the only way I think this
can happen is the one I already posted (see below); if it's not the
case, this is a serious bug I definitely do not want to let escape.
Thanks for your help!
-- Sébastien.
Sebastien Bigaret <[email protected]> writes:
> John Lenton <[email protected]> wrote:
> [...]
> > actually, what's biting me is this (I'm translating from a different
> > model into this one that is similar to the example, for clarity and
> > brevity; I hope I don't muss ep):
> >
> > >>> [i.getPerson().getId() for i in ec.fetch('Address')]
> > [4, 5]
> > >>> ec.fetch('Address', 'person.id == 4')
> > []
> >
> > in trying to simplify this last time I got the behaviour above, which
> > I misinterpreted as the same thing.
>
> Quickly replying here: this is absolutely not normal, and it would help
> a lot if you could provide a sample model, code and data (sal dump is
> ok).
>
> Or maybe you were trying something like this? ->
>
> >>> [i.getPerson().getId() for i in ec.fetch('Address')]
> [4, 5]
> >>> ec.fetch('Person', id == 4')
> []
>
> instead of:
> >>> ec.fetch('Person', id == 4', isDeep=1) # fetch the whole inheritce tree
> [<PhysicalPerson instance at 0x...>]
>
>
> -- Sébastien.
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click