Hello,
Say that i have a table with reports with a column 'title' and a one to
many relationship 'chapters' to chapters also with a column 'title', if i
join these tables in a query, like:
q =
self.session.query(Report).join(Report.chapters).add_columns(Report.title,
Chapter.title, Chapter.text)
for p in q.all():
print p.title
print p.title prints the title of the chapter.
Is there a way to let the query.all() return NamedTuples with
qualified/disambiguated names (either 'title' and 'chapters.title' or
'Report.title' and 'Chapter.title' or perhaps with underscores), because
now i see no way to distinguish the columns (apart maybe from the order).
p.keys() returns 'title' twice.
Cheers, Lars
PS: i am using sqla 0.7.5
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.