Re: [Modeling-users] toOne relationship returns base class instead of subcl
Status: Abandoned
Brought to you by:
sbigaret
|
From: Sebastien B. <sbi...@us...> - 2004-07-29 08:30:36
|
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=E9bastien.
Sebastien Bigaret <sbi...@us...> writes:
> John Lenton <jl...@gm...> 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):
> >=20
> > >>> [i.getPerson().getId() for i in ec.fetch('Address')]
> > [4, 5]
> > >>> ec.fetch('Address', 'person.id =3D=3D 4')
> > []
> >=20
> > in trying to simplify this last time I got the behaviour above, which
> > I misinterpreted as the same thing.
>=20
> 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).
>=20
> Or maybe you were trying something like this? ->
>=20
> >>> [i.getPerson().getId() for i in ec.fetch('Address')]
> [4, 5]
> >>> ec.fetch('Person', id =3D=3D 4')
> []
>=20
> instead of:
> >>> ec.fetch('Person', id =3D=3D 4', isDeep=3D1) # fetch the whole inheri=
tce tree
> [<PhysicalPerson instance at 0x...>]
>=20
>=20
> -- S=E9bastien.
|