On Feb 16, 2010, at 7:07 PM, Manlio Perillo wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Michael Bayer ha scritto: >> [...] >>> just so I can understand fully can you modify the paste I sent to >>> illustrate exactly how the results are happening, as that can help me to >>> formulate the best version of this feature. >> > > I have pasted a complete working fragment of the code I have used: > http://paste.pocoo.org/show/179089/ > > > By the way, I still have a problem when using fold_equivalents. > http://paste.pocoo.org/show/179092/
the feature would be built into the select(), that as each column is added, if a column of the same name exists and is related by a foreign key, it is skipped. It shouldn't be hard for you to temporarily work this in as a preliminary step each time you call the column() method. You could probably even make a subclass of Select() that does it. This is one reason fold_equivalents is deprecated. Its not that hard to roll yourself. But it can be built into select() at some point which is a better place for it to be than in join(). > > > Again, the plain SQL code does not show duplicate columns here: > > wsgix=> select * from content_types NATURAL JOIN contents > NATURAL JOIN content_articles > NATURAL JOIN categories WHERE slug='python'; > type | category_slug | slug > - ---------+---------------+-------- > article | programming | python > (1 riga) > > > > > Thanks Manlio > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkt7MzQACgkQscQJ24LbaUQSIACeMnH/OGepSOJrVpnMZYvUNo7O > pu0An0GE4BUNGHaLAyuI+frAbuEm5dFw > =/13b > -----END PGP SIGNATURE----- > > -- > 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. > -- 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.
