On Jun 1, 2007, at 5:33 PM, [EMAIL PROTECTED] wrote:

> heh, if i remember how whole-heartly u defended this autodescend thing
> some months ago...

we didnt have generative behavior built into query so there was no  
way to conveniently get at an attribute based on a join.

>
> and more IMO, i think all these auto-guessing things in SA (and u have
> many,many of them, and u like them) are _okay_ as far as there is a
> way to disable them and require/specify all explicitly.

i cant think of other places in SA that are literally "guessing".  we  
have a lot of "assuming" as well as "defaults".  these are not  
guesses because they are deterministic.  a guess means you have more  
than one choice, and you pick one - randomly, or based on other  
things that were random (like dictionary ordering).  it cant be  
predicted.

if you map a relation from class A to B, we "assume" the join  
condition is based on the foreign keys between A and B's table.  if I  
say A.join(B), the only possible way to join them unless explicitly  
stated is along their foreign keys (or I suppose you could say their  
column names, but that would be silly).   thats not a guess...it will  
do the same thing every time.

another example of a "default" is if you map a relation from A->A, it  
places the foreign key on the right side of the relation by default  
unless you specify "remote side".   thats also not a guess.

the topological sort that occurs during a flush - there is a degree  
of non-determinism there to the extent that more than one ordering  
exists for a given set of dependencies.  but it *is* deterministic  
that the resulting ordering will be correct.  theres no "guess"  
there, just that the specific ordering is just undefined, just like  
for a dictionary.

if there were many, many guesses going on, we'd have many, many  
broken applications.




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