SQLAlchemy rocks!!!
Thanks.

P.S. Even though it can't figure out relationship if one table is
missing in a chain of relationship, I think I can do some tricks about
it. FYI, I just did a test between 4 tables

tableA id
tableB id, tableA_id
tableC id, tableB_id, tableD_id
tableD id

and did
select([...],from_obj=[tableA.join(tableB).join(tableD)])

If I'll find any api to tell me about relationship of table I'm done,
I can figure out missing relationship and add tables to the join.
It would be nice to cover this case as well (or may be I'm still
missing something).

On Feb 5, 3:22 pm, "Michael Bayer" <[EMAIL PROTECTED]> wrote:
> select([x.c.col1, y.c.col2, z.c.col3, ...],
> from_obj=[x.join(y).join(z).join(q)...])
>
> On Feb 5, 2:27 pm, "vkuznet" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I've trying to solve the following problem. I've given a list of
> > tables and list of columns to look at.
> > All tables are auto-loaded from DB. So, I don't know a priory (I don't
> > want to know) the relationships and table schema. Now, how to build a
> > general join among tables and retrieve only the list of given columns
> > names. As an example, there is an explicit join call and I can do
>
> > join(tableObj1, tableObj2).select()
>
> > but selection will be done for all columns and as of my understanding
> > join can do only 2 tables.
>
> > Can it be generalized to a list of tables and can selection be done
> > only on given column names?
>
> > Thanks,
> > Valentin.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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