On Sunday 29 July 2007 23:36:32 Michael Bayer wrote:
> This would be a new name available in 0.4 which would produce the
> same Session that we are familiar with, except it would be by
> default transactional and autoflushing.  The create_session()
> function stays around and does what it always did, producing a
> regular session which you flush().
>
> while we have both Session() and create_session() in the trunk now,
> Session() would be what we document going forward.  flags to make
> it act other ways are still available, like
> autoflush/transactional.
>
> any thoughts ?
as long as u have both ways (autoflush/noauto, trans/notrans) on same 
object - flags etc - and the difference is well documented, and the 
usage patterns of both (or are there 4 combinations) are explained...

will the readonly= flag go in too?

btw is autoflushing meaning that .save always calls .flush, 
instance-per-instance? 
Then how about making sess.save working over list or *args and saving 
them all? (may be another method savemany that just calls save in a 
loop)

And, would this mean that in an autoflushing session calling .flush  
is useless (being called anyway after each .save automaticaly)?
hmm. then just make .flush to issue .commit... (i know about different 
semantics etc, but most people do not want the semantix, they just 
want the data going to db). Maybe even add another method meaning 
either .flush for (trans=0, autoflush=whatever) or .commit for 
(trans=1, autoflush=1), or .flush then .commit for (trans=1, 
autoflush=0).

heh, this transactional Session() will make the antipattern 'just 
one-loooooooong-session' appear somewhat different...

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