On Sep 24, 2008, at 6:23 AM, [EMAIL PROTECTED] wrote:

>
> hi
> i have cascade= option of relation switched automaticaly between "all"
> and other values, and nothing. so i used cascade=None as nothing,
> hoping it will get the default behaviour. the result was some query
> got 6x slower (actualy thats why i went hunting it)...
>
> nope, it happens that source-wise, exactly cascade=False triggers the
> default behavior (whatever that is) and nothing else. Not really
> intuituve, well, fine, i'll fix me code, but the question still
> remains:
> why cascade=None or cascade='' or whatever empty thing makes queries
> (sqlite) sooo slow.
> i've compared the sql of the query - it's same.
> something in the schema went wrong? or result-processing? or what? is
> it worth chasing or there is a known reason?

wild guess, something to do with objects that normally would have been  
cascaded into the session were not, and are being loaded instead.     
but otherwise no clue, you'd have to provide specifics.

> and a related suggestion: why not use symbols e.g. some singleton
> called DefaultValue, instead of any hard-to-guess default values (be
> them False, None, '', whatever)? the actual default values are mostly
> set up later, so the
>  if something is DefaultValue: something = actual-default-value
> is there anyway.

i think the "foo=False" as a default might have been some habit I  
picked up when looking at the source code to SQLObject (or maybe  
SQLObject2).

I didn't think we had too much public API with the "default=False"  
thing going on but I havent taken a poll.    Usually these defaults  
should just be documented.  A symbol like "DefaultValue" might be nice  
except I don't see how that's any more obvious for someone who isn't  
reading docstrings.


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