On Jun 25, 2008, at 1:24 PM, bukzor wrote:

>
> Thanks for that versioning overview.
>
> Sorry for changing the topic (Should I make a separate post?), but is
> there a way to make the joins more automatic?
>
> I'd like to just specify some filter against table A and another
> against table B and have the system join them, even if the join needs
> to go through C or D. Of course the results would be undefined if
> there was more than one path between A and B, but this is not the case
> in my database and I'm sure  a good subset of most databases. Will I
> need to roll this myself? Would people appreciate it if I added this
> functionality to the mapper class? If so, what code would you suggest
> editing? I just need some representation of the database as a graph.

While you're of course free to create your own Query subclass which  
implements a graph traversal of relations to achieve this effect, this  
actual functionality was long ago removed (in the form of the old  
"join_by()" method), since it amounts to guessing; issues were  
apparent almost immedately after its introduction and it was soon  
deprecated.   It requires an expensive graph traversal each time it's  
used, and leads to applications that silently, randomly fail as soon  
as a new foreign key path between the two target tables is added.  It  
fits perfectly the kind of behavior that's targeted by "explicit is  
better than implicit".

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