Hello.
Suppose the following example query
q = session.query(A)
q = q.options(joinedload_all(A.b, B.c, C.d)
q = q.otions(joinedload_all(A.client, PersonalClient.person)
return q
where
A has
b_id FK to b(id)
client_id FK to client(id)
B has
c_id FK to c(id)
C has
d_id FK to d(id)
Client is a root of joined table inheritance
PersonalClient is Client's subtype which adds
person_id FK to person(id)
Person has personal information (such as name and address).
The above query does not work: personal information is not loaded eagerly but on
each access. How should I rewrite the joinedload options to make it work with
joined table inheritance?
Note that if I remove the joined table inheritance from the picture (i.e. let
A's client point directly to PersonalClient), everything works as expected.
Thank you in advance,
Ladislav Lenart
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.