Hi,
I have the following situation:
There are two tables, A and B , both of which have an "id" column.

In a certain part of the code I have an ORM query object.
That query object is returned by some function and I have no apriori
knowledge of its structure.
I am assured, though that there will be an 'id' column. It might be a
SELECT from A, a SELECT from B or a SELECT from A join B  ON
A.id=B.id.

I would like to execute a query.values('id').

This works for the first two cases but in the case of a join it
complains because it does not know if I mean A.id or B.id.
The thing is that I obviously do not care because they are both equal
as a result of the join condition.
I cannot select A.id or B.id because there is always a case of a query
that does not have A or B.

Is there a way to solve this elegantly? I.e. without having to inspect
that structure of the query first.

-- 
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.

Reply via email to