hi
This is to facilitate (or fuel) the discussion about query() methods 
doing autoclone vs returning self + having explicit .copy/.clone() by 
user.

before (v2388) i did have:
 q = SelectResults()....
 q.options( eagerload(whatever))
 return list(q)

now (v2389 onwards) .options() does internaly a self.clone() of the 
query, and original query stays untouched (i.e. it is like 
self.copy.options()). So above stops working.
And i must do:
 q = query()...
 q = q.options( eagerload(whatever))
 return list(q)

Nothing wrong with it, it just makes life harder - there should be 
additional code checking for SA versions (or the return None 
of .options()).

i know this change is old, and the above SelectResults has been made 
to match Query() (cloning) behaviour, and whole SelectResults is 
abandoned, etc, but in this case the "explicit is better than 
implicit" would help to avoid such mess - if u wanna clone, please 
say it...

ciao
svilen

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